captain_skank Hi
I think what you need is to increase the line height
Then you can insert word wrap text and at the same time you can use chr(13) as a Return
Code: Select all
If OpenWindow(0, 0, 0, 640, 440,"WordWrap Demo",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
ListIconGadget(0, 10, 10, 620, 420, "Column 0", 220,#PB_ListIcon_FullRowSelect|#PB_ListIcon_GridLines)
LoadFont(0, "Tahoma", 12 )
SetGadgetFont(0, FontID(0))
Texth = SendMessage_(GadgetID(0), #LVM_GETITEMSPACING, 1, 0) >> 16 - 4
AddGadgetColumn(0, 1, "Column 1", 150)
imageList = ImageList_Create_(1, 5*Texth, #ILC_COLOR32 | #ILC_MASK, 0, 0) ;for 5 lines
SendMessage_(GadgetID(0), #LVM_SETIMAGELIST, #LVSIL_SMALL, imageList)
For x=1 To 4
AddGadgetItem(0,-1, "This is a wordwrap text demonstration in a ListIcon Gadget " + Chr(13) + "This is a separate line" + Chr(10) + "Line 1" + Chr(13) + "Line 2" + Chr(13) + "Line 3" + Chr(13) + "Line 4" + Chr(13) )
Next
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_Gadget
Select EventGadget()
Case 0
EndSelect
EndSelect
Until event = #PB_Event_CloseWindow
EndIf
End