Button which stays pressed lazarus / 8-Other ---------------------------------------------------------------------- Guest · 2005-10-03 20:41 Hi there, I am quite new to Lazarus/FreePascal and it is been some time i did some very basic Delphi stuff. So for the little App I am tryig to make I woul like to have a button that stays pressed after you clicked it and will raise again on the next click. Kind of like a hardware power button. I read about TSpeedButton doing this but I had no luck findig some source code showing how. There also was a referenze to a ToggleButton, but i did not find more information. Can anybody help? Thanks a lot. Greetings,  Carsten ---------------------------------------------------------------------- matthijs · 2005-10-03 21:01 Set the property GroupIndex to a value other then 0 and set the property AllowAllUp to True. This should do the trick. ---------------------------------------------------------------------- Anonymous · 2005-10-04 17:06 Thanx a lot, matthijs. The GroupIndex did the trick. I tried several things with TSpeedButton, but not this one. Great community this! Greetings,  Carsten ---------------------------------------------------------------------- Anonymous · 2006-01-12 16:37 i want to get the button which is clicked, an then the number of this button. e.g. from 'button1.clicked' the '1'. ---------------------------------------------------------------------- matthijs · 2006-01-12 17:18 Quote from: "Anonymous"i want to get the button which is clicked, an then the number of this button. e.g. from 'button1.clicked' the '1'. The easiest way to do this is, is by giving the tag property of the buttons unique values at the moment the are created. Then all you have to do is chech this value and you know which button is pressed.