Link to home
Start Free TrialLog in
Avatar of PeterdeB
PeterdeBFlag for Netherlands

asked on

Simulate windows behaviour > the checkbox'd listbox with description of each item > when cleaning your pc

Hi guys!

How can I copy the behaviour of the windows checkbox'd listbox so that when I select an item a description appears beneath it? Ten items should result in 10 different descriptions.

Working sample grants you the points!

My regards,

PeterdeB
Avatar of PeterdeB
PeterdeB
Flag of Netherlands image

ASKER

I'm almost there and will post the answer myself within an hour I hope:)

PeterdeB
procedure TForm3.LMDLabeledCheckListBox1Click(Sender: TObject);
var i,x: integer;
 begin
   for x:= 0 to lmdlabeledchecklistbox1.Items.Count -1 do
if lmdlabeledchecklistbox1.selected[x] then
 i:=x;
case  i of
0:label1.caption := '';
1:label1.caption := '';
2:label1.caption := '';
3:label1.caption := '';
4:label1.caption := '';
5:label1.caption := '';
6:label1.caption := '';
7:label1.caption := '';
8:label1.caption := '';
9:label1.caption := '';
end ;

end;

Working jiehaaaaaaaa!!! In case someone wanted to reply or is already doing so right now > you get the points anyway :)

Peter
Oeps I'm a little too hasty > how can I get rid of the 'Variable i might not have been initialized' message?

Peter
Avatar of jonas78
jonas78

I'm not sure on how to do that in a local procedure...
But if you declare the variables globaly you can set the value when you declare them
ie.

i : Integer = 0;
x : Integer = 0;


ASKER CERTIFIED SOLUTION
Avatar of DragonSlayer
DragonSlayer
Flag of Malaysia 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
Hey my friend Dragonslayer long time no see! Your solution works > I got rid of the annoying message. I haven't tested what Jonas posted because your solution seemed more of an answer than his no offence.

Thanks both of you for replying!!

My regards and max respect to you guys!!

PeterdeB from Holland
heh... you haven't emailed me for a while ;-)
Correct my friend and you don't want to know how many times I got stuck in Delphi searching for answers you'd easily have given if I had asked. Which brings me to the following > I got rid of your emailaddress......so I'll provide mine

pdbiel@hotmail.com

Drop me a mail will ya?

My regards and max respect!!

PeterdeB from holland