Take the 2-minute tour ×

I use TButtongroup in my program and make a function to change color when a button group item clicked. The first click on 1 item, the function ButtonGroup1ButtonClicked executed, but the second click makes no any affect.

procedure TMainFrm.ButtonGroup1ButtonClicked(Sender: TObject; Index: Integer);

  if ButtonGroup1.Items[index].ImageIndex =0 then
    ButtonGroup1.Items[index].ImageIndex :=1
    ButtonGroup1.Items[index].ImageIndex :=0;


How can a buttongroupitem treat every click like a standard button, Please help?

share|improve this question
I don't know a reason for the handler not to be called for clicks on each and every button. However, I don't think I understand the question. –  Sertac Akyuz Jan 9 '13 at 13:18
I just made a test project and ButtonGrup work as you want in XE2 Update 4. –  jachguate Jan 9 '13 at 16:28
Thanks all, I found the answer by setting property gbogroupstyle = false. –  Thinh Nguyen Jan 9 '13 at 16:54
add comment


Your Answer



Browse other questions tagged or ask your own question.