PDA

View Full Version : Help


Andrey167
20-07-2014, 02:51
Hello!
I apologize in advance for my English!
I need your help.
I would like to create a form with information as to repack Black Box
but I can not impose on the form of pictures and text to create one change depending on the language setting.
Here is my code

[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Files]
Source: "ReadMeRu.rtf"; DestDir: "{tmp}"; Flags: ignoreversion

[code]
var
InfoForm: TSetupForm;
Info, Ok: TButton;
InfoBefore: TRichEditViewer;
ReadmeRu,ReadmeEn: AnsiString;

procedure Okclick(Sender: TObject);
begin
InfoForm.Close;
WizardForm.Enabled:=True;
end;

procedure FormClose(Sender: TObject; var Action: TCloseAction);
begin
WizardForm.Enabled:=true;
end;

procedure InfoClick(Sender: TObject);
begin
InfoForm:= CreateCustomForm();
with InfoForm do begin
ClientWidth := ScaleX(350);
ClientHeight := ScaleY(250);
CenterInsideControl(WizardForm, False);
Caption:='';
onClose:=@FormClose;
Ok:=tbutton.create(InfoForm)
with Ok do begin
SetBounds(ScaleX(290),ScaleY(210),ScaleX(50),Scale Y(30));
parent:=InfoForm;
Caption:='OK';
onclick:=@OKclick;
end;
InfoBefore:= TRichEditViewer.Create(InfoForm);
with InfoBefore do begin
SetBounds(ScaleX(10),ScaleY(10),ScaleX(330),ScaleY (180));
Parent:= InfoForm;
// ParentColor := True;
// Color:= WizardForm.Color;
// BorderStyle:= bsNone;
ScrollBars:= ssVertical;
ReadOnly:= true;
RTFText:= ReadmeRu
end;
InfoForm.Show;
WizardForm.Enabled:=false;
end;
end;

procedure InitializeWizard;
begin
ExtractTemporaryFile('ReadMeRu.rtf');
LoadStringFromFile(ExpandConstant('{tmp}')+'\ReadM eRu.rtf', ReadmeRu);
Info:=tbutton.create(WizardForm);
with Info do begin
Parent:=WizardForm;
SetBounds(ScaleX(20),ScaleY(325),ScaleX(45),ScaleY (30));
Caption:='x';
OnClick:=@InfoClick;
end;
end;

Dante1995
20-07-2014, 06:43
I do not see images :)

Andrey167
20-07-2014, 08:06
I do not see images :)

http://i65.fastpic.ru/big/2014/0717/96/ceb612b9192777d759a0e101c4043196.png

Dante1995
20-07-2014, 08:49
is a simple text .RTF, all you need to view a file ReadMe.rtf :D

Andrey167
20-07-2014, 09:01
is a simple text .RTF, all you need to view a file ReadMe.rtf :D

yes I know but I do not know how to make 2 Dunn lingual text

Razor12911
20-07-2014, 14:36
Ok, I don't think there is something wrong with your English but now that you mentioned that your English might not seem good it tricked my brain into opening suggestions on what you are trying to ask even though that is not necessary. So anyways. If you want something multi language, it can be done in two ways. It either from the language select dialog or from inside the application itself. Just pick one option.
Just take note, language select dialog is simple and from the application is hard.

Andrey167
21-07-2014, 00:07
Ok, I don't think there is something wrong with your English but now that you mentioned that your English might not seem good it tricked my brain into opening suggestions on what you are trying to ask even though that is not necessary. So anyways. If you want something multi language, it can be done in two ways. It either from the language select dialog or from inside the application itself. Just pick one option.
Just take note, language select dialog is simple and from the application is hard.

I would like at least one example for 2 languages
Sorry for my english

Dante1995
25-07-2014, 05:56
perhaps better to duplicate a lot of math :rolleyes:


http://s28.postimg.org/v8ybk9ko9/Senza_titolo_1.jpg (http://postimg.org/image/v8ybk9ko9/)

Andrey167
25-07-2014, 06:46
perhaps better to duplicate a lot of math :rolleyes:
A great example can throw?