[Lazarus] Dynamic creation of TTrackBar

Brad Campbell brad at wasp.net.au
Thu Dec 17 16:58:59 CET 2009


Mattias Gaertner wrote:
> On Thu, 17 Dec 2009 23:37:21 +0800
> Brad Campbell <brad at wasp.net.au> wrote:
> 
>> G'day all,
>>
>> I'm currently using "Lazarus 0.9.29 r22679 FPC 2.2.5 i386-linux-gtk 2 (beta)".
>>
>> On a form, I'm creating 30-40 instances of a TTrackBar dynamically. If, at design time I have a 
>> TTrackBar on the form, this all goes swimingly. If, however there is no TTrackBar on the form, when 
>> I run the application I get "Class "TTrackBar" not found.".
> 
> How do you create the TTrackBars?
> 

Sorry about that.

Var
	Fred : Array[0..15] of TTrackBar;

Procedure Doit;
Var
   I : Integer;
Begin
   For I := 0 to 15 do
     Begin
     Fred[I] := TTrackBar.Create(Form1);
     Fred[I].Parent := Form1;
     End;
End;



-- 
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.




More information about the Lazarus mailing list