PVGadgets_SelectListIconRow (GadgetID.l,Row.l)

Top  Previous  Next

Forces the selected row of a ListIconGadget into view.

 

Use:

PVGadgets_SelectListIconRow(#Gadget,Row)

 

 

Example:

 

#Main=0

#List=1

 

If OpenWindow(#Main,0,0,400,300,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"")

If CreateGadgetList(WindowID(#Main))

ListIconGadget(#List,0,0,400,300,"Column 1",150,#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect)

AddGadgetColumn(#List,1,"Column 2",100)

AddGadgetColumn(#List,2,"Column 3",100)

EndIf

 

For tmp=0 To 20

AddGadgetItem(#List,-1,"TestA_"+Str(tmp)+Chr(10)+"TestB_"+Str(tmp)+Chr(10)+"TestC_"+Str(tmp))

Next

 

PVGadgets_SelectListIconRow(#List,18)   ;row 18 is selected and forced into view

 

Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow

EndIf