Kebas Posted July 9, 2008 Share Posted July 9, 2008 Hi all, I'm a newbie in AutoIt and struggle with the following: I use _FileReadToArray to read a comma seperated textfile, with 3 columns (i.c. 2 comma's per line) When I use _ArrayDisplay to display this array, I'll see only two columns (one with the recordnumber and second the whole textline; this is not a problem) The problem is, that default the column (col 0) is much to small to display the text. How can I make this column wider, so the text is displayed well? I don't think I must edit the Array.au3? Or am I doing something wrong? Dim $aRecords If Not _FileReadToArray("test.csv",$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf _ArrayDisplay($aRecords, "Labels") Thanks for help in advance. Greetings, Kebas The Netherlands. Link to comment Share on other sites More sharing options...
herewasplato Posted July 10, 2008 Share Posted July 10, 2008 _FileReadToArray splits each line of the file based on this code: $aArray = StringSplit($sTemp, @CRLF, 1) If @error Then $aArray = StringSplit($sTemp, @LF) If @error Then $aArray = StringSplit($sTemp, @CR)If you want to split within a line based on the comma as the delimiter - you will have to roll your own code. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
herewasplato Posted July 10, 2008 Share Posted July 10, 2008 Oh - Welcome to the forums :-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Kebas Posted July 10, 2008 Author Share Posted July 10, 2008 Oh - Welcome to the forums :-)Thanks!But will this also solve the problem of the column widths? Link to comment Share on other sites More sharing options...
jvnorris Posted July 10, 2008 Share Posted July 10, 2008 I belive the this function is primarily just for a quick review of the data contained in your array. TO properly display it you should create a new fuction to dispaly the information you are looking for. Link to comment Share on other sites More sharing options...
herewasplato Posted July 10, 2008 Share Posted July 10, 2008 Thanks!But will this also solve the problem of the column widths?Nope.jvnorris may be correct - _ArrayDisplay may primarily be for debugging code. That is all that I've ever used it for and I don't know enough about GUI functions to modify it.Maybe Gary (the author of the UDF) can stop by this thread and confirm. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Kebas Posted July 10, 2008 Author Share Posted July 10, 2008 Nope.jvnorris may be correct - _ArrayDisplay may primarily be for debugging code. That is all that I've ever used it for and I don't know enough about GUI functions to modify it.Maybe Gary (the author of the UDF) can stop by this thread and confirm.Thank you all for your reply. I'll try to find a solution. Link to comment Share on other sites More sharing options...
Kebas Posted July 10, 2008 Author Share Posted July 10, 2008 (edited) Thank you all for your reply. I'll try to find a solution. Solved! After the line GUICtrlCreateListViewItem($avArrayText[$i], $hListView) you must add the following: GUICtrlSendMsg($hListView, $LVM_SETCOLUMNWIDTH, 1, 390) where the last digit is the columnwidth. Edited July 10, 2008 by Kebas Link to comment Share on other sites More sharing options...
GaryFrost Posted July 10, 2008 Share Posted July 10, 2008 Nope.jvnorris may be correct - _ArrayDisplay may primarily be for debugging code. That is all that I've ever used it for and I don't know enough about GUI functions to modify it.Maybe Gary (the author of the UDF) can stop by this thread and confirm.Although I didn't write the function I believe it's main purpose was for debugging. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
herewasplato Posted July 10, 2008 Share Posted July 10, 2008 Although I didn't write the function I believe it's main purpose was for debugging.My bad - I got off by a line:; Author ........: randallc, Ultima ; Modified.......: Gary Frost (gafrost) / Ultima: modified to be self-contained (no longer depends on "GUIListView.au3")Thanks for stopping by. :-) [size="1"][font="Arial"].[u].[/u][/font][/size] 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