Thanks Paul and Paul.
Yes what you say below is correct, but it would be slower I think than a
case statement?
Another possibility I have just figured cause yesterday my brain was at half
mast due to the full moon and nobody got much sleep and last night our 1.5
YO daughter played merry hell so its same again today......
The button is a speedbutton variant. You 'should' be able to set a
groupindex of say '1' and then the button 'should' stay down according to
the bible. So that is a more efficient way of doing in this instance. Now I
gotta look at Buttons.pas to find out why the groupindex is not working as
it should.
thanks a lot.
Al+
> is this the Sort of thing you are trying to do...
>
> var
>   BtnName: String;
> begin
>   BtnName := 'Pic' + IntToStr(Value);
>   for I := 0 to Form1.ComponentCount - 1 do  // Loop through all
> Components
> "Owned" by the Form
>     if (Form1.Components[I] is TButton) then // If "Type" TButton
> (could do
> - if TButton & Correct Name)
>       with TButton(Form1.Components[I]) do   // Use The Component
> - cast to
> "Type" Button
>         if (Name = BtnName) then             // If the Correct name
>         begin
>           // Set the Properties
>           Font.Color := clSilver;
>           Enabled := False;
>         end;
> // this will work for Components "Owned" by the Form
> //  - ie Visually Created or Dynamically Created on the Form by
> TButton.Create(Self);
>
>
>
> Regards
> Paul
> [EMAIL PROTECTED]
> (Wellington - New Zealand)
>
>
> -----Original Message-----
> From: Alistair George [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 30 July 1999 09:04 AM
> To: McKenzie, Paul
> Subject: RE: [DUG]: sending component references
>
>
>
> > Depends what "Value: DWord" is ? a button name ? a button caption ?
> OK, make it an integer.
> Say I want to refer to a button called Pic1 for instance the value:integer
> would be incoming as 1 and I want to use value as the appendage
> to 'Pic' so
> that in fact Pic1 is selected.
> Cheers,
> Al+
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to