Page 1 of 1

Select first ListViewGadget row?

Posted: Wed Jan 03, 2018 9:56 pm
by ssg_mick
Hi,

how can i select the first row of an ListViewGadget?

I tried SetGatgetItemState(myListViewGadget, 0, 1) but no row is selected.

Mick

Re: Select first ListViewGadget row?

Posted: Thu Jan 04, 2018 10:40 am
by RASHAD

Code: Select all

 If OpenWindow(0, 0, 0, 270, 140, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ListViewGadget(0, 10, 10, 250, 120,#PB_ListView_MultiSelect)
    For a = 1 To 12
      AddGadgetItem (0, -1, "Item " + Str(a) + " of the Listview") ; define listview content
    Next
    SetGadgetItemState(0,0,1) ; set (beginning with 0) the tenth item as the active one
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf

Re: Select first ListViewGadget row?

Posted: Thu Jan 04, 2018 10:46 am
by mk-soft
SetGadgetState(0, 0)