jSherz
2012-01-28 09:45:08
SOLVED using an alternative method.
Hi,
I am trying to write a function that will create and then return a TLABEL object - for use in easier label creation.
This is the function:
This is the error:
This is the line that is causing the error (155):
The UsernameLabel TLABEL is defined globally as follows:
Any help would be much appreciated!
Hi,
I am trying to write a function that will create and then return a TLABEL object - for use in easier label creation.
This is the function:
Function CreateLabel(Parent : TFORM; Top : Integer; Left : Integer; Caption : String) : TLABEL;
var
TmpLabel : TLABEL;
begin
TmpLabel := TLABEL.Create(Parent);
TmpLabel.Top := Top;
TmpLabel.Left := Left;
TmpLabel.Caption := Caption;
Result := TmpLabel;
end;This is the error:
[Error] (156:63): Internal error (20) at line 155
Compiling failed.This is the line that is causing the error (155):
UsernameLabel = CreateLabel(FrmDesign, 60, 370, 'Username:');The UsernameLabel TLABEL is defined globally as follows:
var
// Labels
UsernameLabel : TLabel;Any help would be much appreciated!