chunga Posted January 17, 2008 Share Posted January 17, 2008 I just upgraded from an old version of AutoIt from mid-2006 to the latest version 1.71 Nov 25 2007 and my script with GUICtrlCreateListViewItem is behaving differently now. I already modified the code to work around the change in behavior, but was wondering if this is expected behavior or if it is a bug. The problem can be reproduced by running the sample code from the help file for GUICtrlCreateListViewItem. CODE#include <GUIConstants.au3> GUICreate("listview items",220,250, 100,200,-1,$WS_EX_ACCEPTFILES) GUISetBkColor (0x00E0FFFF) ; will change background color $listview = GuiCtrlCreateListView ("col1 |col2|col3 ",10,10,200,150);,$LVS_SORTDESCENDING) $button = GuiCtrlCreateButton ("Value?",75,170,70,20) $item1=GuiCtrlCreateListViewItem("item2|col22|col23",$listview) $item2=GuiCtrlCreateListViewItem("............item1|col12|col13",$listview) $item3=GuiCtrlCreateListViewItem("item3|col32|col33",$listview) $input1=GuiCtrlCreateInput("",20,200, 150) GuiCtrlSetState(-1,$GUI_DROPACCEPTED) ; to allow drag and dropping GuiSetState() GUICtrlSetData($item2,"|ITEM1") GUICtrlSetData($item3,"||COL33") GUICtrlDelete($item1) Do $msg = GuiGetMsg () Select Case $msg = $button MsgBox(0,"listview item",GUICtrlRead(GUICtrlRead($listview)),2) Case $msg = $listview MsgBox(0,"listview", "clicked="& GuiCtrlGetState($listview),2) EndSelect Until $msg = $GUI_EVENT_CLOSE If you run that code and either drag & drop a list item to the textbox, or select a list item then click the button, you'll see a pipe | be appended to the end. The old version of autoit that I was running did not behave like this. This is my first post to this forum so I hope I provided enough detail and posted in the right place. Thanks for the great free software. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 17, 2008 Share Posted January 17, 2008 Good question, but I would recommend using #include <GUIListView.au3>oÝ÷ Ù©Ý{-y§h~¢rÚåæºÇ+ºÚ"µÍÑÕRPÝÝY]×ÑÙ]][U^Ý[Ê ÌÍÛÝY]Ê Link to comment Share on other sites More sharing options...
chunga Posted January 17, 2008 Author Share Posted January 17, 2008 Thanks for the tip. That has the behavior I'm used to. Link to comment Share on other sites More sharing options...
randallc Posted January 17, 2008 Share Posted January 17, 2008 hi, looks like a bug, though; anyone want to try the new bug reporting system? Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 18, 2008 Share Posted January 18, 2008 Thanks for the tip. That has the behavior I'm used to.I have the latest version and the gettextstring doesn't show the extra pipe on the end :-/. But post in bug reports with a detailed explanation and example script and so on 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