lyledg Posted January 15, 2008 Posted January 15, 2008 (edited) I am having some issues trying to insert data, using the new version 3.2.10.0 and code below _GUICtrlListView_InsertItem($LISTVIEW, GUICtrlRead($APPNAMEinput) & "|" & $Inputrslt, -1);Write out the command line It inserts all the text into the first column, (See attached pic) although I want the data spread across two columns. This used to work on the older version of Autoit...what am I doing wrong? EDIT: typo Edited January 15, 2008 by lyledg
GaryFrost Posted January 15, 2008 Posted January 15, 2008 I am having some issues trying to insert data, using the new version 3.2.10.0 and code below _GUICtrlListView_InsertItem($LISTVIEW, GUICtrlRead($APPNAMEinput) & "|" & $Inputrslt, -1);Write out the command line It inserts all the text into the first column, (See attached pic) although I want the data spread across two columns. This used to work on the older version of Autoit...what am I doing wrong? EDIT: typo Things change: Remarks You can not use this function to insert subitems. Use _GUICtrlListView_SetItemText to insert subitems. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
lyledg Posted January 15, 2008 Author Posted January 15, 2008 (edited) Thanks Gary But still having issues. Command is: _GUICtrlListView_SetItemText($Listview, 1, GUICtrlRead($APPNAMEinp) & "|" & $Inputrslt, 1);Write out the command line Am I right in thinking that you have to have text in the listview before you can use _GUICtrlListView_SetItemText? Edited January 15, 2008 by lyledg
GaryFrost Posted January 15, 2008 Posted January 15, 2008 Thanks Gary But still having issues. Command is: _GUICtrlListView_SetItemText($Listview, 1, GUICtrlRead($APPNAMEinp) & "|" & $Inputrslt, 1);Write out the command line Am I right in thinking that you have to have text in the listview before you can use _GUICtrlListView_SetItemText? Just do an insert with no text, then use the setitemtext SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
lyledg Posted January 15, 2008 Author Posted January 15, 2008 Thanks Gary I will give that a go, but why was the workability of the function we had been made more difficult? Could the new function not have kept that functionality?
GaryFrost Posted January 15, 2008 Posted January 15, 2008 Thanks GaryI will give that a go, but why was the workability of the function we had been made more difficult? Could the new function not have kept that functionality?I merged the Standard Libraries with the AU3Libs, around 1500 or 1600 functionsI might if I get around to looking at that function again, probably just do internally what I just told you to do. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
lyledg Posted January 15, 2008 Author Posted January 15, 2008 Ok, thanks mate...It would make things eaiser having one step instead of a few.. Cheers
GaryFrost Posted January 15, 2008 Posted January 15, 2008 Ok, thanks mate...It would make things eaiser having one step instead of a few..Cheersfor now just write a wrapper function that does those steps SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
GaryFrost Posted January 15, 2008 Posted January 15, 2008 Just looked at the code and remembered why that functionality wasn't put back in, the insert does a whole lot more than it used to. Sets image if needed, sets param if needed, etc... Wouldn't be worth all the trouble. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
JimZ Posted April 30, 2010 Posted April 30, 2010 OK, I am a newbie to Autoit and have the same problem. I am trying to make an older script work with a newer version of Autoit. This line from the old script: _GUICtrlListViewInsertItem($lv, -1, $data) used to format a line in a table. I changed it to _GUICtrlListView_InsertItem($lv, $data, -1) and now I get all of the fields in column 1 of the table. I tried replacing the InsertItem with the SetItemText and that did not work for me. I am not quite sure what you meant by do an insert with no text and then us SetItemText. Could you explain that a little more? Thanks, Jim Z.
Moderators Melba23 Posted April 30, 2010 Moderators Posted April 30, 2010 JimZ,Welcome to the AutoIt forum. Have you looked at the Help file? For my version(3.3.6.1) the Remarks for this command include:You can not use this function to insert subitems. Use _GUICtrlListView_SetItemText to insert subitems.So it is hardly surprising that you can only enter fields in the first column - if you need to put data in the other columns you need a different command.Perhaps if you posted your code (always a good idea ) we might be able to offer more help. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
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