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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...