Kogmedia Posted July 1, 2007 Share Posted July 1, 2007 (edited) Hello, I can't get this to work it makes the coloums it resizes but doesn't resize the listview correctly I.E COL0=82 : RESIZED 6 COL1=341 : RESIZED 12 COL2=72 : RESIZED 12 COL3=46 : RESIZED 12 COL4=68 : RESIZED12 COL5=46 : RESIZED 12 The console gives me the right sizes 82 341 72 46 68 46 settings.ini [GUI] COL0=82 COL1=341 COL2=72 COL3=46 COL4=68 COL5=46 #include <GUIConstants.au3> #include <GuiListView.au3> $Form1 = GUICreate("TEST", 633, 454, 197, 115) $List1 = GUICtrlCreateListView("COL0|COL1|COL2|COL3|COL4|COL5", 8, 16, 617, 409) GUISetState(@SW_SHOW) For $x = 0 To 5 $COL = IniRead("settings.ini","GUI","COL"&$x,100) ConsoleWrite(@CRLF&$COL) _GUICtrlListViewSetColumnWidth ( $List1, $x, $COL ) MsgBox(0,"COL"&$x,"Width : "&_GUICtrlListViewGetColumnWidth ($List1, $x)) Next While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Edited July 1, 2007 by Kogmedia [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 1, 2007 Share Posted July 1, 2007 Hello, I can't get this to work it makes the coloums it resizes but doesn't resize the listview correctly Everything read out of an .ini is a string. Convert it to a number first with Number(): _GUICtrlListViewSetColumnWidth ($List1, $x, Number($COL)) Some AutoIt functions gracefully convert a string of a number to the number, but evidently _GuiCtrlListViewSetColumnWidth() is not one of them. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Kogmedia Posted July 1, 2007 Author Share Posted July 1, 2007 Thank you I couldn't understand what was happening [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search 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