#89099 - 2002-10-31 11:16 AM
Kixforms - Listbox Bug
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
When you click on an item in a listbox it refuses to change the colour of the label even if it's set. Looks like a bug to me - it works however with a textbox.
code:
$listbox = $form.ListBox("") $listbox.Size=110,255 $listbox.Location=15,80 $listbox.BorderStyle=1
$listbox.AddItem("My Item") $listbox.OnClick = "Display()"
function Display() $text = $form.Label("This my item",140,80,200,16) $text.BackColor = 255,255,255 endfunction
|
Top
|
|
|
|
#89100 - 2002-10-31 11:51 AM
Re: Kixforms - Listbox Bug
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
punkie,
no buggy boo , does this fit yer needs :
code:
break on cls
$form = createobject("Kixtart.form")
$listbox = $form.ListBox("") $listbox.Size=110,255 $listbox.Location=15,80 $listbox.BorderStyle=1 $ListBox.default = 1
$listbox.AddItem("My Item") $ListBox.AddItem("My next Item") $listbox.OnClick = "ShowItem($$listbox.List($$Listbox.ListIndex))"
$text = $form.Label($Item,140,80,200,16) $text.BackColor = 255,255,255
$form.show
while $Form.visible $= execute($Form.DoEvents()) loop
quit()
function ShowItem($item) $Text.Caption = $item endfunction
Jochen
_________________________
|
Top
|
|
|
|
#89103 - 2002-11-01 12:10 AM
Re: Kixforms - Listbox Bug
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
I saw a bug in my code! forgot to call the label before the function so it only changed colour when you clicked on the item twice.
I just used the Display() thing as an example tho. Thanks for the assistance
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
2 registered
(morganw, mole)
and 414 anonymous users online.
|
|
|