View Full Version : how can i check which dynamicly created speedbutton in group is down?
rasta
08-19-2001, 02:01 AM
so, could you please write me a simple code if posible.
thanx in advance!
Chris T.
08-19-2001, 03:15 PM
If you mean a GroupBox then just put GroupBox1. in front of ControlCount.. also GroupBox1.ControlCount
Here the sample:
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
begin
for i:=0 to ControlCount-1 do begin
if Controls[i].ClassType = TSpeedButton then begin
if not TSpeedButton( Controls[i] ).Down then ShowMessage(Controls[i].Name + ' is down!');
end;
end;
end;
That will search all SpeedButtons on Form1
Hope that helps you
Chris T.
08-19-2001, 03:17 PM
if TSpeedButton( Controls[i] ).Down then ShowMessage(Controls[i].Name + ' is down!');
no not needed, i've just tested
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.