ListIconGadget autoscroll
Posted: Sun Aug 18, 2024 5:19 pm
Please add the automatic rewind function to the last position in the ListIcon Gadget!
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
If OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, 290, 90, "Name", 100, #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection)
AddGadgetItem(0, -1, "1")
AddGadgetItem(0, -1, "2")
AddGadgetItem(0, -1, "3")
AddGadgetItem(0, -1, "4")
AddGadgetItem(0, -1, "5")
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
Code: Select all
If OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, 290, 90, "Name", 100, #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection)
AddGadgetItem(0, -1, "1")
AddGadgetItem(0, -1, "2")
AddGadgetItem(0, -1, "3")
AddGadgetItem(0, -1, "4")
AddGadgetItem(0, -1, "5")
SetGadgetState(0, 4)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf