GUI ListView: Can you use multiple lines or word wrap?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mrmech
Posts: 81
Joined: 07 Dec 2015, 17:37

GUI ListView: Can you use multiple lines or word wrap?

Post by mrmech » 30 Mar 2023, 14:45

I have a ListView that shows the value of several variables:

Can paragraphs word wrap in a GUI ListView field?
Can a field have multiple lines?
Can you remove the 260 character limit?

Thanks for any help!

Code: Select all

Gui, +AlwaysOnTop
Gui, Add, ListView, Grid -Hdr r11 w400, Field|Info
LV_Add("", "Series:", Series1)
LV_Add("", "Authors:", AuthorsResults)
LV_Add("", "Artists:", ArtistsResults)
LV_Add("", "Year:", Year)
LV_Add("", "GenreResults:", GenreResults)
;------------------------------------------------
LV_ModifyCol(1, 60)
LV_ModifyCol(2)

Gui, Show, AutoSize, New GUI Window
Gui, Color, White
return

GuiClose:
Reload
Return

User avatar
mikeyww
Posts: 26596
Joined: 09 Sep 2014, 18:38

Re: GUI ListView: Can you use multiple lines or word wrap?

Post by mikeyww » 30 Mar 2023, 18:15

Another way:

Code: Select all

#Requires AutoHotkey v1.1.33

html =
(
<style type="text/css">
table {
 border-collapse:collapse;
 border:1px solid #FF0000;
}
table td {
 border:1px solid #FF0000;
}
</style>
<body>
 <table>
  <tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>
    <td>Francisco Chang</td>
    <td>Mexico</td>
  </tr>
</table> 
</body>
)
Gui -DPIScale
Gui Margin, 0, 0
Gui Add, ActiveX, vText w500 h160, htmlfile
Text.write(html)
Gui Show,, Table
Return
image230330-1915-001.png
GUI
image230330-1915-001.png (13.84 KiB) Viewed 226 times

mrmech
Posts: 81
Joined: 07 Dec 2015, 17:37

Re: GUI ListView: Can you use multiple lines or word wrap?

Post by mrmech » 31 Mar 2023, 08:37

Thanks, I'll give this a shot.

Post Reply

Return to “Ask for Help (v1)”