Verfasst: 27.08.2006 15:36
Werde mal sehen, was ich bzgl. Hilfe machen kann....
Code: Alles auswählen
If OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If CreateGadgetList(WindowID(0))
ListIconGadget(0, 5, 5, 290, 90, "Name", 100, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(0, 1, "Address", 250)
AddGadgetItem(0, -1, "Harry Rannit"+Chr(10)+"12 Parliament Way, Battle Street, By the Bay")
AddGadgetItem(0, -1, "Ginger Brokeit"+Chr(10)+"130 PureBasic Road, BigTown, CodeCity")
Debug CountGadgetItems(0)
ClearGadgetItemList(0)
Debug CountGadgetItems(0)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
EndIf
Aber sicherlich !!!>> Die Spalten werden ja durch ClearGadgetItemList() nicht zerstört
Soso?
Code: Alles auswählen
Procedure.l CountGadgetColumns(Liste.l)
Protected Col.LV_COLUMN, ColCount.l
Col\mask = #LVCF_WIDTH
While SendMessage_(GadgetID(Liste), #LVM_GETCOLUMN, ColCount, Col)
ColCount + 1
Wend
ProcedureReturn ColCount
EndProcedure
If OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If CreateGadgetList(WindowID(0))
ListIconGadget(0, 5, 5, 290, 90, "Name", 100, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(0, 1, "Address", 250)
AddGadgetItem(0, -1, "Harry Rannit"+Chr(10)+"12 Parliament Way, Battle Street, By the Bay")
AddGadgetItem(0, -1, "Ginger Brokeit"+Chr(10)+"130 PureBasic Road, BigTown, CodeCity")
Debug "Number of items : " + Str(CountGadgetItems(0))
Debug "Number of columns : " + Str(CountGadgetColumns(0))
UpdateWindow_(WindowID(0)) : Delay(2000)
ClearGadgetItemList(0)
Debug "Number of items : " + Str(CountGadgetItems(0))
Debug "Number of columns : " + Str(CountGadgetColumns(0))
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
EndIf