The snag is that, when you drag the Window size out to the right, "column 3" is stretched to suit, rather than a column you are actually using. Is there a way around that conundrum?
Code: Select all
#Win = 0
#ListIcon = 1
Procedure OpenWin()
;------------------
If OpenWindow(#Win, 100, 100, 400, 300,"4th Column",#PB_Window_SizeGadget|#PB_Window_SystemMenu|#PB_Window_TitleBar)
ListIconGadget(#ListIcon,10,25,380,250,"Col 0", 80,#PB_ListIcon_AlwaysShowSelection|#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect)
AddGadgetColumn(#ListIcon, 1, "Col 1", 150)
AddGadgetColumn(#ListIcon, 2, "Col 2", 150)
; Gadget Resizing
PureRESIZE_SetGadgetResize(#ListIcon, 1, 1, 1, 1)
SendMessage_(GadgetID(#ListIcon), #LVM_SETEXTENDEDLISTVIEWSTYLE, #LVS_EX_GRIDLINES, #LVS_EX_GRIDLINES)
EndIf
EndProcedure
OpenWin()
Repeat
iEvent = WaitWindowEvent(1)
Until iEvent = #PB_Event_CloseWindow
CloseWindow(#Win)
End

