Jump to content

Recommended Posts

Posted

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.

post-35882-1215633845_thumb.jpg

Posted

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.

Posted

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]

Posted

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.

Posted (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 by Kebas
Posted

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.

 

Posted

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]

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
×
×
  • Create New...