Then the items to add i use
Code: Select all
AddGadgetItem(#ListView,-1,Text)
But when i add more then the listview can show the last added text is not showing. The side is showing a shift bar to indicate that there was added a item.
Normaly that is no problem. But i like to see the last added item at the bottom of the listview.
Is there a way to get this done.
Example code:
Code: Select all
Enumeration FormWindow
#Window_1
EndEnumeration
Enumeration FormGadget
#ListView_0
#Button_0
#Button_1
EndEnumeration
Global number.i
Procedure OpenWindow_1(x = 0, y = 0, width = 205, height = 250)
OpenWindow(#Window_1, x, y, width, height, "", #PB_Window_ScreenCentered)
ListViewGadget(#ListView_0, 5, 35, 195, 165)
ButtonGadget(#Button_0, 5, 210, 90, 30, "Add Item")
ButtonGadget(#Button_1, 110, 210, 90, 30, "Quit")
EndProcedure
Procedure Window_1_Events(event)
Select event
Case #PB_Event_Gadget
Select EventGadget()
Case #Button_0 ; Add item
AddGadgetItem(#ListView_0,-1,"Added Item"+ Str(Number))
Number+1
Case #Button_1 ; End
End
EndSelect
EndSelect
ProcedureReturn #True
EndProcedure
Openwindow_1()
Repeat
Window_1_events(WaitWindowEvent(20))
ForEver