au3scr Posted September 3, 2008 Share Posted September 3, 2008 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: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:expandcollapse popup#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 EndFuncThanks for everyone who can help me. Link to comment Share on other sites More sharing options...
Nahuel Posted September 3, 2008 Share Posted September 3, 2008 Try this: $List1 = GUICtrlCreateListView ( "windows", 3,3,314,180) _GUICtrlListView_SetColumnWidth($List1,0,300);300 is the width of the 0th column. Change it to whatever you want Link to comment Share on other sites More sharing options...
Madza91 Posted September 3, 2008 Share Posted September 3, 2008 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 More sharing options...
au3scr Posted September 3, 2008 Author Share Posted September 3, 2008 0x101E - What that mean? Link to comment Share on other sites More sharing options...
Madza91 Posted September 3, 2008 Share Posted September 3, 2008 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 More sharing options...
rasim Posted September 4, 2008 Share Posted September 4, 2008 n3nEIs improtant what that mean?Always, for me! au3scrIts mean a LVM_SETCOLUMNWIDTH message. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now