Jump to content

Multilined listview ?! possible ?!


Recommended Posts

well... before i'll start writing my own line splitter to split long lines and place them inside the listview properly i'd like to know if there is such a possibility to have a multilined listview...

maybe setting the item's hight enough to hold 2 line ?!

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Link to comment
Share on other sites

i don't have a screen shot but i can explain myself in here...

| Header                    | Header2 | Header3 |
I have a                     |
  long text line here    |SubItem1  SubItem2

well... the forum probably screwed my example up so i'll use words as well....

>> i want to have two lines for the same subitem in a certain item inside a listview.... possible ?!

my current idea is to parse each text line before it's implemented into it's subitem, and check if it's over $x chars then split it and implement it into two items inside a listview.... pulling the other subitems down with it...

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Link to comment
Share on other sites

@Zedna

have you seen such a control mate ?!

i've been looking through the search thingy for the last 3 hrs... [or more!]

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Link to comment
Share on other sites

@Zenda

well.. i've just found a nice, quick and easy way to do it.

... though it was in the help file and not through the search [bAH!]

>> not that i blame you or anything [i love you man! you total PWN!]...

Anyhow... for others to come:

_GUICtrlListView_SetView($hWnd, 4)

P.S> i still have some issues with it as it makes my list view span way too much.... it seems like the item spaces are huge and now i have to figure out how to close these redundant gaps. [Will edit/post here if i'll find a way to fix the looks]

Edit> i think it's like this because there's room for icons above the text.

Edit2> noep...

Edit3> Still can't make it work... no function has any effect after you set the view to tile. :(

Thanks Z. :)

Edited by Armand

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Link to comment
Share on other sites

Confusing as always :)

Tile view and Details view are two different modes, and Details mode is the only one with columns. So which one do you really want?

Also, do you want rows to have variable height (depending on number of lines in item text), or fixed height?

If you expect the former and also need columns, you might be in for a disappointment. ListBox has ownerdraw with variable height, Listview has no such style (at least documented), so probably any ownerdraw solution would have to involve some kind of additional workaround (as if drawing everything isn't enough of a hassle).

If fixed height is good enough, then it's pretty easy (relatively speaking), and I think it doesn't even need ownerdraw, it should be doable with customdraw. 1st, set big default font (such as, GUICtrlSetFont($ListView, 16)), or create and apply an ImageList with such height (can be dummy, if you're not using item icons), then create a font that's ~twice smaller and use it to draw item texts during NM_CUSTOMDRAW. If you search forum, there has to be some customdraw listview examples that I posted, and IIRC it already includes example of using DrawText API to draw item text, so it should be very easy to modify. I might actually do it myself sometime later and post in examples forum if you want.

Edited by Siao

"be smart, drink your wine"

Link to comment
Share on other sites

@Siao

Was waiting for your reply on the subj :) [Just cause i know you PWN the listviews, like BANG!!!]

enough silly talking....

All i need is an ability to show some information in a minimal area... [180 px width].

Now, i've found that "_GUICtrlListView_SetView($listview, 1)" and "_GUICtrlListView_SetView($listview, 4)" shows multilined list-views... however these doesn't suit my needs quite well as both of these are as if having padding from the sides and top, and a scroll bar on button [at width of 180px].

If i could only remove the padding on these... it'd look like i want it to...

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Link to comment
Share on other sites

See if some ListView functions, such as _GUICtrlListView_SetIconSpacing(), help. Otherwise post a very short working example (gui+listview, with some items, and size that you need) of your padding problem. Because I'm not exactly sure what you mean.

"be smart, drink your wine"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...