InstallationWay
Новичок
Hi! Here is a method which will create static Text on a page:
It is working well. but ...
I have created a method doing this like this:
and then edit the first method like this:
but it will not work why?
Код:
procedure RedesignWizardForm;
begin
staUninstall: = TNewStaticText.Create (WizardForm);
with staUninstall do
begin
Parent: = WizardForm;
AutoSize: = False;
Caption: = '';
Name: = 'Uninstall';
Transparent: = True;
TabStop: = True;
Left: = ScaleX (08);
Top: = ScaleY (321);
Width: = ScaleX (81);
Height: = ScaleY (25);
Cursor: = crHand;
TabOrder: = 1;
end;
staUninstall.OnClick: = @TextOnClick;
staUninstall.OnMouseDown: = @TextMouseDown;
staUninstall.OnMouseEnter: = @TextMouseEnter;
staUninstall.OnMouseLeave: = @TextMouseLeave;
end;
I have created a method doing this like this:
Код:
procedure CreateStaticText (staticText: TNewStaticText; name: String; left: Integer; top: Integer; width: Integer; height: Integer; tabOrder: Integer);
begin
staticText: = TNewStaticText.Create (WizardForm);
with staticText do
begin
Parent: = WizardForm;
AutoSize: = False;
Caption: = '';
Name: = name;
Transparent: = True;
TabStop: = True;
Left: = ScaleX (left);
Top: = ScaleY (top);
Width: = ScaleX (width);
Height: = ScaleY (height);
Cursor: = crHand;
TabOrder: = tabOrder;
end;
staticText.OnClick: = @TextOnClick;
staticText.OnMouseDown: = @TextMouseDown;
staticText.OnMouseEnter: = @TextMouseEnter;
staticText.OnMouseLeave: = @TextMouseLeave;
end;
Код:
procedure RedesignWizardForm;
begin
CreateStaticText (staUninstall, 'Uninstall', 8, 321, 81, 25, 1);
end;
Последнее редактирование модератором: