Page 1 of 1

Listicongadget problem Sb2.20

Posted: Wed Nov 15, 2017 9:51 am
by karu
If i don't add lines to listicongadget immediately after creating it, listicongadget will not roll content to selected line

Code: Select all
Procedure GadgetEvent()
 
  If EventGadget() = 33
    SetGadgetState(22, 10)
  ElseIf EventGadget() = 44
    For Counter = 0 To 20
      AddGadgetItem(22, -1, Str(CountGadgetItems(22) ) + #LF$ + "Address lklklklklklkl" + Counter)
    Next
  EndIf
 
EndProcedure

OpenWindow(0, #PB_Ignore, #PB_Ignore, 800, 200, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(22, 0, 40, 800, 200, "Name", 70, #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(22, 1, "Address", 400)
ButtonGadget(33, 0,0,90,20,"select line 10")
ButtonGadget(44, 100,0,90,20,"addlines")
BindEvent(#PB_Event_Gadget, @GadgetEvent())

For Counter = 0 To 20
  ;AddGadgetItem(22, -1, Str(CountGadgetItems(22) ) + #LF$ + "Address lklklklklklkl" + Counter)
Next