Why ListIcon/View scrollbar event?
Posted: Mon Jan 26, 2009 6:48 pm
In the ListIcon and ListView gadget, I click on a line and I get the line number back using 'EventGadget()'. I move the scrollbar and I get the same line number back. What is the point in that? I have to use 'EventType()' and '#PB_EventType_LeftClick' just to avoid the scrollbar event. It would be simpler just to have the scrollbar ignored in 'EventGadget()'.
Why does it work this way?
Code: Select all
If OpenWindow(0, 0, 0, 270, 140, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListViewGadget(0, 10, 10, 250, 120)
For a = 1 To 12
AddGadgetItem (0, -1, "Item " + Str(a) + " of the Listview")
Next
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_Gadget
MessageRequester("Move the scrollbar",Str( GetGadgetState(0)+1))
EndSelect
Until event = #PB_Event_CloseWindow
EndIf