Jump to content

Need ListView help


au3scr
 Share

Recommended Posts

How i can make ListView wider? I want ListView width as longest list element.I have no idea how to explain so I added pictures here.

Now it looks like:

Posted Image

but i want to make ListView wide as longest item in list so I can get rid of ... at the end of line and I can fully see window title in list.

I want it to look like this:

Posted Image

#include <guiconstants.au3>
#include <File.au3>
#include <String.au3>
#include <GuiEdit.au3>
#include <Process.au3>



GUICreate("Window mannager", 320, 400)
$List1 = GUICtrlCreateListView ( "windows", 3,3,314,180)
$var = WinList()
For $i = 1 to $var[0][0]
  ; Only display visble windows that have a title
  If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then
    GUICtrlCreateListViewItem($var[$i][0] , $List1)
  EndIf
Next
GUICtrlCreateInput("",3,183,314,20)

GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
;### Tidy Error -> "endswitch" is closing previous "case"
        EndSwitch
;### Tidy Error -> "wend" is closing previous "switch"
    WEnd






Func IsVisible($handle)
  If BitAnd( WinGetState($handle), 2 ) Then 
    Return 1
  Else
    Return 0
  EndIf

EndFunc

Thanks for everyone who can help me.

Link to comment
Share on other sites

Or:

$List1 = GUICtrlCreateListView ( "windows", 3,3,314,180)
GUICtrlSendMsg(-1, 0x101E, 0, 300)

[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Link to comment
Share on other sites

Is improtant what that mean? important is that works... ;)

Btw, u can use Koda form designer and u will see in options answer for your question ;D

[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

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...