Link to home
Start Free TrialLog in
Avatar of anishraj
anishraj

asked on

Help with TCheckListBox

hi,
Can ne1 help me with this .
I am using a TChecklist box . I want to show a form, when the user checks a any item in the checklistbox. I do not want to show the form, if he is unchecking an already checked item. That is I want to differentiate between checking and unchecking, the item in a TCheckListBox. The event onClickCheck gets fired for both checking and unchecking , so I can't use it because I don't know whetheer the item is being checked, or unchecked.
thanking u in advance
anish
Avatar of Igor UL7AAjr
Igor UL7AAjr
Flag of Kazakhstan image

procedure TForm1.CheckListBox1Click(Sender: TObject);
begin
  if CheckListBox1.Checked[CheckListBox1.ItemIndex] then
  begin
    // show form here
  end;
end;
ASKER CERTIFIED SOLUTION
Avatar of Igor UL7AAjr
Igor UL7AAjr
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anishraj
anishraj

ASKER

I solved it in the same way b4 seeing ur comment. i think i should have tried it myself b4 asking it here.anway thank u so much and here are ur points.
thank you too:)