Как создать подобный ListIconGadget?
Пока посоветовали только такой вариант:
Procedure WndProc(hwnd, uMsg, wParam, lParam)
result = #PB_ProcessPureBasicEvents
Select uMsg
Case #WM_NOTIFY,#WM_SETREDRAW
*NMHDR.NMHDR = lParam
; Fixed Column Width
If IsGadget(1) And *NMHDR\hWndFrom = GetWindow_(GadgetID(1),#GW_CHILD) And *NMHDR\code = #HDN_FIRST
*phdn.NMHEADER = lParam
If *phdn\Iitem = 0
ProcedureReturn 1
EndIf
EndIf
EndSelect
ProcedureReturn result
EndProcedure
If OpenWindow(0, 0, 0, 640, 300, "ListIconGadgets", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ContainerGadget(0,10,25,620,260,#PB_Container_Flat)
ListIconGadget(1, 0, 0, 140, 200, "Column 1", 139,#PB_ListIcon_GridLines|#PB_ListIcon_CheckBoxes)
SetWindowLongPtr_(GadgetID(1),#GWL_EXSTYLE,0)
SetGadgetColor(1,#PB_Gadget_BackColor,$EAFEFE)
SetGadgetColor(1,#PB_Gadget_LineColor,$C5C5C5)
ListIconGadget(2, 150, 0, 480, 200, "Column 2", 150,#PB_ListIcon_GridLines|#PB_ListIcon_CheckBoxes)
SetWindowLongPtr_(GadgetID(2),#GWL_EXSTYLE,0)
SetGadgetColor(2,#PB_Gadget_BackColor,$EAFEFE)
SetGadgetColor(2,#PB_Gadget_LineColor,$C5C5C5)
For i = 0 To 6
AddGadgetItem(1, i, "Item 1")
Next
For i = 1 To 4
AddGadgetColumn(2, i, "Column " + Str(i+2), 65)
Next
For i = 0 To 6
AddGadgetItem(2, i, "Item 2"+Chr(10)+"Item 3"+Chr(10)+"Item 4"+Chr(10)+"Item 5"+Chr(10)+"Item 6")
Next
ResizeGadget(1,0,0,140,260)
ResizeGadget(2,140,0,480,260)
CloseGadgetList()
SetWindowCallback(@WndProc())
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Отредактировано 4RESTER (07.09.2011 13:32:03)