Ok I have a TCheckListBox but I have no idea how to use it...for example I want SCAR to do one thing if a certain item in that box is checked. How do I go about doing that? Thanks.
Ok I have a TCheckListBox but I have no idea how to use it...for example I want SCAR to do one thing if a certain item in that box is checked. How do I go about doing that? Thanks.
Hmm, i personnaly have got a CheckListBox in my form:
I only use to see if a box is checked, however CheckListBox.Checked[boxnumber] is the command, it took me a while to find out. To check wether there is a change, hmm, try this one.:
I dont think there is a way to do a action on a special box. I might be wrongSCAR Code:CheckListBox.OnClicK := @Change![]()
Verrekte Koekwous
Quite simple: You add this command:
Then you make a procedure like this:Code:ComboBox.OnChange := @Change; And this if you like (i do, it makes sure you cant type in the box ;)) : ComboBox.Style := csDropDownListLike this?SCAR Code:Procedure Change(Sender : TOBject);
begin;
case ComboBox.ItemIndex of
0 : writeln('Item 0 is used');
1 : writleN('item 1 is used');
end;
end;
Verrekte Koekwous
Erm...since the text in the combobox changes when you seleect an item you can just do:
SCAR Code:Combobox1.OnChange := @Change;
SCAR Code:procedure Change(Senders : TObject);
begin
case Combobox1.Text of
'Whatever' : WriteLn('Whatever');
'Something' : WriteLn('Something');
end;
end;
[CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
[CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]
[CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]
There are currently 1 users browsing this thread. (0 members and 1 guests)