Toggle button Root › Technical support › Tricks This topic has 5 replies, 3 voices, and was last updated 13 years, 2 months ago by Typograph. Viewing 5 posts - 1 through 5 (of 5 total) Author Posts January 30, 2012 at 10:22 am #47660 SupportKeymaster Hello I have one idea only – painting of button as active manually in the OnPaint event… January 31, 2012 at 7:53 pm #47690 JM-DGParticipant Good idea. I'll let you know how it went. 🙂 February 3, 2012 at 4:24 pm #47719 JM-DGParticipant Here's how I did it. 🙂 Code: var EqIsOn: Boolean; procedure TEq.EqOnOffbutClick(Sender: TObject); begin if EqIsOn=true then begin EqIsOn:= false; EqOnOffbut.Caption := 'Off'; end else begin EqIsOn:= true; EqOnOffbut.Caption := 'On'; end; EqOnOffbut.Down:= EqIsOn; end; Thanks for the help! February 9, 2012 at 9:23 pm #47756 TypographParticipant 1. Put a SpeedButton on the form 2. Set Property GroupIndex to a value higher than 0 3. Set allowUp to TRUE In Code TsSpeedButton(Sander).Down := Not TsSpeedButton(Sander).Down February 9, 2012 at 9:28 pm #47757 TypographParticipant procedure TEq.EqOnOffbutClick(Sender: TObject); Const Cap : array[0..1] Of String =('Off',On'); begin TsSpeedButton(Sender).Down := Not TsSpeedButton(Sender).Down TsSpeedButton(Sender).Caption := Cap[TsSpeedButton(Sender).Down] end; Thats it…. Author Posts Viewing 5 posts - 1 through 5 (of 5 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In Root › Technical support › Tricks