Code: Select all
IncludeFile "ProGUI_PB.pb" ; comment this line out when using the UserLibrary version
StartProGUI("", 0, 0, 0, 0, 0, 0)
Enumeration
#Window
EndEnumeration
Enumeration
#Font_Arial9
#Panel
#ListView
EndEnumeration
LoadFont(#Font_Arial9,"Arial",9,0)
Procedure Open_Window()
OpenWindow(#Window, 50, 50, 200, 120, "Example", #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_Invisible)
CreatePanelEx(#Panel, WindowID(#Window), 0, 0, 180, 120, 0)
AddPanelExPage(0)
ListViewGadget(#ListView, 15, 15, 120, 79)
SetGadgetFont(#ListView, FontID(#Font_Arial9))
SetGadgetColor(#ListView, #PB_Gadget_FrontColor, RGB($FF,$0,$0)
AddGadgetItem(#ListView, -1, "Row 1")
AddGadgetItem(#ListView, -1, "Row 2")
AddGadgetItem(#ListView, -1, "Row 3")
EndProcedure
Open_Window() ; create window
HideWindow(0, 0) ; show our newly created window
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget
GadgetID = EventGadget()
EndIf
Until Event = #WM_CLOSE
CloseWindow(#Window)