Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1053
  • Last Modified:

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
0
anishraj
Asked:
anishraj
  • 3
1 Solution
 
ITugayCommented:
procedure TForm1.CheckListBox1Click(Sender: TObject);
begin
  if CheckListBox1.Checked[CheckListBox1.ItemIndex] then
  begin
    // show form here
  end;
end;
0
 
ITugayCommented:
sorry,
of course ClickCheck instead of Click

procedure TForm1.CheckListBox1ClickCheck(Sender: TObject);
begin
  if CheckListBox1.Checked[CheckListBox1.ItemIndex] then
  begin
    // show form here
  end;
end;

0
 
anishrajAuthor Commented:
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.
0
 
ITugayCommented:
thank you too:)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now