see code below:-
function InsertDataInListboxes()
a = itemCount(ListboxParent)
if a > 0
for r = 1 to a
rr = r - 1
removeItem ListboxParent,rr
next r
a = itemCount(ListboxChild)
endif
if a > 0
for r = 1 to a
rr = r - 1
removeItem ListboxChild,rr
next r
endif
if NumberOfLimbs > 0
for r = 0 to NumberOfLimbs
a$ = Limbs(r).Name
addItem ListboxParent,a$,r
addItem ListboxChild,a$,r
next r
selectItem ListboxParent,0
selectItem ListboxChild,0
setAutoUpdate ListboxParent,1
setAutoUpdate ListboxChild,1
paintGadget ListboxParent
paintGadget ListboxChild
endif
endfunction
I'd set up the Listboxes (ListboxParent & ListboxChild) earlier in the code.... then I want in the function to clear the lists and reset them according to retrieved limb data - only when I do this or any sane variant of it, the listboxes dont reflect the new data - any ideas why?
[edit] - note the desperation in the use of paintGadget and setAutoUpdate to make the damn gadgets show the items...
a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...