#LVS_EX_AUTOCHECKSELECT für Checkboxen und alles markieren
Verfasst: 04.03.2013 11:42
Der Style LVS_EX_AUTOCHECKSELECT könnte nützlich sein, wenn man Spalte null benutzt
Ob es auch unter XP funktioniert weiß ich nicht, ansonsten ab Vista
Auf jeden Fall, funktioniert es auch ohne SetWindowTheme() bei mir
Ob es auch unter XP funktioniert weiß ich nicht, ansonsten ab Vista
Auf jeden Fall, funktioniert es auch ohne SetWindowTheme() bei mir
Code: Alles auswählen
Import "UxTheme.lib"
SetWindowTheme(hwnd, classname.p-unicode, titlename)
EndImport
#list_nr = 1
If OpenWindow(0, 100, 100, 400, 500, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
flags = #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection
flags | #PB_ListIcon_MultiSelect
;flags | #PB_ListIcon_CheckBoxes
ListIconGadget(#list_nr, 5, 5, 390, 490, "Name", 100, flags)
SetWindowTheme(GadgetID(#list_nr), "explorer", 0)
#LVS_EX_AUTOCHECKSELECT = $08000000
exstyle = SendMessage_(GadgetID(#list_nr), #LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
SendMessage_(GadgetID(#list_nr), #LVM_SETEXTENDEDLISTVIEWSTYLE, 0, exstyle | #LVS_EX_AUTOCHECKSELECT)
AddGadgetColumn(#list_nr, 1, "Address", 250)
For j = 1 To 22
AddGadgetItem(#list_nr, -1, "Harry Rannit"+#LF$+"12 Parliament Way, Battle Street, By the Bay")
AddGadgetItem(#list_nr, -1, "Ginger Brokeit"+#LF$+"130 PureBasic Road, BigTown, CodeCity")
Next
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf