Another strange method
Code: Select all
Enumeration
#window_jor
#list_jor_errors
EndEnumeration
If OpenWindow(#window_jor, #PB_Any, #PB_Any, 420, 240, "PW Window", #PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_Invisible)
ListIconGadget(#list_jor_errors, 5,5, 410, 230, " Time", 0, #PB_ListIcon_FullRowSelect|#PB_ListIcon_GridLines)
AddGadgetColumn(#list_jor_errors, 1, "Text 1", 60)
AddGadgetColumn(#list_jor_errors, 2, "Text 2", 340)
imageList = ImageList_Create_(1, 30, #ILC_COLOR32, 0, 30)
SendMessage_(GadgetID(#list_jor_errors), #LVM_SETIMAGELIST, #LVSIL_SMALL, imageList)
AddGadgetItem(#list_jor_errors, -1,Chr(10)+ FormatDate("%hh:%ii:%ss", Date() + 10) + Chr(10) + "String" + Chr(13) + "String")
AddGadgetItem(#list_jor_errors, -1,Chr(10)+ FormatDate("%hh:%ii:%ss", Date() + 10) + Chr(10) + "String" + Chr(13) + "String")
AddGadgetItem(#list_jor_errors, -1,Chr(10)+ FormatDate("%hh:%ii:%ss", Date() + 10) + Chr(10) + "String" + Chr(13) + "String")
AddGadgetItem(#list_jor_errors, -1,Chr(10)+ FormatDate("%hh:%ii:%ss", Date() + 10) + Chr(10) + "String" + Chr(13) + "String")
HideWindow(#window_jor, 0)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
CloseWindow(#window_jor)
Break
EndSelect
ForEver
EndIf
Code: Select all
Enumeration
#window_jor
#list_jor_errors
EndEnumeration
Global Dim FixColumn(3)
Procedure WinCB(hWnd, msg, wParam, lParam)
Result = #PB_ProcessPureBasicEvents
If msg = #WM_NOTIFY
*nhdr.NMHEADER = lParam
If *nhdr\hdr\code=#HDN_ITEMCHANGING
If FixColumn(*nhdr\iItem)
*npos.HD_ITEM = *nhdr\pitem
*npos\cxy=0
EndIf
EndIf
EndIf
ProcedureReturn Result
EndProcedure
If OpenWindow(#window_jor, #PB_Any, #PB_Any, 420, 240, "PW Window", #PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_Invisible)
SetWindowCallback(@WinCB())
LI = ListIconGadget(#list_jor_errors, 5,5, 410, 230, "", 60, #PB_ListIcon_FullRowSelect|#PB_ListIcon_GridLines)
AddGadgetColumn(#list_jor_errors, 1, "Text 1", 60)
AddGadgetColumn(#list_jor_errors, 2, "Text 2", 340)
imageList = ImageList_Create_(1, 30, #ILC_COLOR32, 0, 30)
SendMessage_(GadgetID(#list_jor_errors), #LVM_SETIMAGELIST, #LVSIL_SMALL, imageList)
AddGadgetItem(#list_jor_errors, -1,Chr(10)+ FormatDate("%hh:%ii:%ss", Date() + 10) + Chr(10) + "String" + Chr(13) + "String")
AddGadgetItem(#list_jor_errors, -1,Chr(10)+ FormatDate("%hh:%ii:%ss", Date() + 10) + Chr(10) + "String" + Chr(13) + "String")
AddGadgetItem(#list_jor_errors, -1,Chr(10)+ FormatDate("%hh:%ii:%ss", Date() + 10) + Chr(10) + "String" + Chr(13) + "String")
AddGadgetItem(#list_jor_errors, -1,Chr(10)+ FormatDate("%hh:%ii:%ss", Date() + 10) + Chr(10) + "String" + Chr(13) + "String")
SendMessage_(LI, #LVM_SETCOLUMNWIDTH,0,0)
FixColumn(0) = 1
HideWindow(#window_jor, 0)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
CloseWindow(#window_jor)
Break
EndSelect
ForEver
EndIf