Wooltown Posted June 7, 2005 Share Posted June 7, 2005 Hello ! TreeView in 3.1.1.43 is behaving strangely, just by going up and down in the list with arrows are generating an event for each line, this must be wrong. Regards Sven #include <GUIConstants.au3> Opt("GUIOnEventMode",1) GUICreate("test") $treeview = GUICtrlCreateTreeView (6,6,300,434,BitOr($TVS_HASBUTTONS,$TVS_HASLINES,$TVS_LINESATROOT,$TVS_DISABLEDRAGDROP,$TVS_SHOWSELALWAYS,$TVS_CHECKBOXES,$TVS_TRACKSELECT ),$WS_EX_CLIENTEDGE ) $item1 = GUICtrlCreateTreeViewItem("Item1",$treeview) GUICtrlSetOnEvent(-1,"ItemSelection") $item2 = GUICtrlCreateTreeViewItem("Item2",$treeview) GUICtrlSetOnEvent(-1,"ItemSelection") $item3 = GUICtrlCreateTreeViewItem("Item3",$treeview) GUICtrlSetOnEvent(-1,"ItemSelection") $item4 = GUICtrlCreateTreeViewItem("Item4",$treeview) GUICtrlSetOnEvent(-1,"ItemSelection") $subitem1 = GUICtrlCreateTreeViewItem("SubItem1",$item1) GUICtrlSetOnEvent(-1,"ItemSelection") $subitem2 = GUICtrlCreateTreeViewItem("SubItem2",$item1) GUICtrlSetOnEvent(-1,"ItemSelection") $status = GUICtrlCreateLabel("0",350,10,50,20) GUISetOnEvent($GUI_EVENT_CLOSE,"ExitGUI") GUISetState() While 1 Sleep(10) WEnd Exit Func ItemSelection() GUICtrlSetData($status,@GUI_CtrlId) Msgbox(0,"Event",@GUI_CtrlId,1) EndFunc Func ExitGUI() Exit EndFunctesta.au3 Link to comment Share on other sites More sharing options...
jpm Posted June 7, 2005 Share Posted June 7, 2005 That's the way Holger want the treeview to react. When an entry is select an event is fired whatever you change the state. Perhaps it would have been better to fire the event only when the state is changed; What do you think Holger? Link to comment Share on other sites More sharing options...
ptrex Posted June 7, 2005 Share Posted June 7, 2005 About a TreeView look please have a look at the features of this : http://www.obout.com/t2/edraganddrop.aspxThey sypply a free dll to get a treeview working (including drag and drop functionality).Is there anyone who can investigate if we can use the dllCall function to access the fucntionality ?Or maybe using COM migt be succesful as well.To be continued ... Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Holger Posted June 7, 2005 Share Posted June 7, 2005 The event-coming is normal, so please take a look into your explorer and move the key up and down. Do you see a change in your explorer listview? If not then I think you a problem So a change of the item-focus can only reported by fireing an event. Regards Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
Wooltown Posted June 7, 2005 Author Share Posted June 7, 2005 The script I use lists a number of testcases from a directory and present them in a TreeView The way I use it, is to select a number of testcases, by clicking on the TreeViewItem and have them Checkmarked if the testcases should be tested, otherwise the checkbox is blank, I use an array to keep track of the slected testcases. The normal way to select is to use the mouse or by using space bar, I can't use Space bar in AutoIt not in 3.1.1 or in this Beta. Regards Sven Link to comment Share on other sites More sharing options...
Holger Posted June 7, 2005 Share Posted June 7, 2005 @Wooltown: I already know your wish/idea and have it already here at home. I don't know why there has to be one more forum entry here for this... Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView 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