#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    How can I click button group item more than 1 time in Delphi Xe2?


    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);
    begin

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

    end;
    How can a buttongroupitem treat every click like a standard button, Please help?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0
    I found the answer by setting property gbogroupstyle = false.

IMN logo majestic logo threadwatch logo seochat tools logo