Jump to content

"Down" property in SpeedButton?


tappatappa

Recommended Posts

Can someone explain to me how does UniSpeedButton->Down works?

My guess is that SpeedButton has two states (Down and Up) and can be used as a "checkbox" (Checked true/false), but

void __fastcall TForm1::ButtonSpeedClick(TObject *Sender)
{
	ButtonSpeed->Down = !ButtonSpeed->Down;
}

does nothing (graphically)

Link to comment
Share on other sites

You are on the right track, look at the attached example.

 

Thanks for your reply. In order to make it work for a single SpeedButton I had to implement a little trick

void __fastcall TForm1::ButtonSpeedAClick(TObject *Sender)
{
	static bool speedAstate = false;
	ButtonSpeedA->Down = !speedAstate;
	speedAstate = !speedAstate;
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...