GEOSoft Posted October 20, 2010 Posted October 20, 2010 I see GEOSoft just beat me to it! That's easy even on your best days.How did I do? Not bad for a young buck. DLL calls and I don't get along so, although I knew what the problem was, I wasn't going to be the one to re-write it.Now, if you are truly the kind and gentle soul (read as "wimp") that we all think you are, you could be nice and add the modified version to the thread where you found Siaos code. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Moderators Melba23 Posted October 20, 2010 Moderators Posted October 20, 2010 (edited) GEOSoft,I will wait until someone with an x64 system tests it first! Where is the OP?But thanks for the compliment (and insult). Just remember what I used to do for a living before you get too cocky though - we know where you live! M23Edit: George, I will add a post to Siao's topic when I have confirmed in the other forum area that my solution is an acceptable one. Edited October 20, 2010 by Melba23 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
Jayson Posted October 20, 2010 Author Posted October 20, 2010 Melba !! You did it !! A VERY hude thank to you !!Now, it is possible to change the ToolTip to display stuff from an array ? I mean to display the tooltip associated with $data[$j][0] which is $data[$j][1]For $i = 1 To $section[0] $data = IniReadSection($ini,$section[$i]) $lol = _GUICtrlTreeView_Add($Tags, 0,$section[$i]) For $j = 1 To $data[0][0] _GUICtrlTreeView_AddChild($Tags, $lol, $data[$j][0]) Next Next
Moderators Melba23 Posted October 20, 2010 Moderators Posted October 20, 2010 Jayson,Melba !! You did it !!You have no idea how pleased I am to hear you say that! Now, it is possible to change the ToolTip to display stuff from an array ?Are you intending to any work on this script at all? Or are you expecting me to do it all? Wait a bit and I will have a look. 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
Jayson Posted October 20, 2010 Author Posted October 20, 2010 Melba, Don't worry, I asked you this in case I can't find the answer. I'm already looking to find a way but there some stuff is over me like this. So, if I find a good way before you i'll post it
Moderators Melba23 Posted October 20, 2010 Moderators Posted October 20, 2010 Jayson,If you get stuck, here is one way to do it: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiTreeView.au3> #include <Array.au3> Global $aData[5][3] = [ _ ["Parent 1", "Parent 1", "ToolTip 1"], _ ["Parent 1", "Child 11 with a very long name", "ToolTip 11"], _ ["Parent 1", "Child 12 with a very long name", "ToolTip 12"], _ ["Parent 2", "Parent 2", "ToolTip 2"], _ ["Parent 2", "Child 21 with a very long name", "ToolTip 21"]] $hGUI = GUICreate("Test", 500, 500) GUISetBkColor(0xC4C4C4) $hTV1 = _GUICtrlTreeView_Create($hGUI, 10, 10, 150, 150) _GUICtrlTreeView_BeginUpdate($hTV1) $sParent = "" For $i = 0 To UBound($aData) - 1 ConsoleWrite($aData[$i][0] & @CRLF) If $aData[$i][0] <> $sParent Then $sParent = $aData[$i][0] $hParent = _GUICtrlTreeView_Add($hTV1, 0, $aData[$i][0]) EndIf If $aData[$i][1] <> $sParent Then $hChild = _GUICtrlTreeView_AddChild($hTV1, $hParent, $aData[$i][1]) Next _GUICtrlTreeView_EndUpdate($hTV1) $hTV2 = GUICtrlCreateTreeView(10, 200, 150, 150) $hTV2_Handle = GUICtrlGetHandle($hTV2) $sParent = "" For $i = 0 To UBound($aData) - 1 If $aData[$i][0] <> $sParent Then $sParent = $aData[$i][0] $hParent = GUICtrlCreateTreeViewItem($aData[$i][0], $hTV2) EndIf If $aData[$i][1] <> $sParent Then $hChild = GUICtrlCreateTreeViewItem($aData[$i][1], $hParent) Next GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MOUSEMOVE SetTip() EndSwitch WEnd Func SetTip() If @AutoItX64 Then Local $tPoint = DllStructCreate("int X;int Y") DllStructSetData ( $tPoint, "X", MouseGetPos(0)) DllStructSetData ( $tPoint, "Y", MouseGetPos(1)) Local $tPoint64 = DllStructCreate("int64", DllStructGetPtr($tPoint)) Local $aHwnd = DllCall("user32.dll", "hwnd", "WindowFromPoint", "int64", DllStructGetData($tPoint64, 1)) Else Local $aHwnd = DllCall("user32.dll", "hwnd", "WindowFromPoint", "uint", MouseGetPos(0), "uint", MouseGetPos(1)) EndIf Switch $aHwnd[0] Case $hTV1, $hTV2_Handle $tMPos = _WinAPI_GetMousePos(True, $aHwnd[0]) $hItem = _GUICtrlTreeView_HitTestItem($aHwnd[0], DllStructGetData($tMPos, 1), DllStructGetData($tMPos, 2)) $sText = _GUICtrlTreeView_GetText($aHwnd[0], $hItem) $iIndex = _ArraySearch($aData, $sText, 0, 0, 0, 0, 1, 1) $sText = $aData[$iIndex][2] If $hItem = 0 Then ToolTip("") Else ToolTip($sText) EndIf Case Else ToolTip("") EndSwitch EndFuncI have also fixed the annoying "persistant" ToolTip that BrewManNH pointed out. 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
Jayson Posted October 20, 2010 Author Posted October 20, 2010 (edited) Melba, As you probably knew, yes, i got stuck . I coudl'nt find a way to merge my array from left to right so i'll use your nice piece of code One more question Having a big array decrease the speed to read it ? Because i would have like 100 Parent item and about 500 subitem. Thank you, again, for your GREAT HELP !! Edited October 20, 2010 by Jayson
Moderators Melba23 Posted October 20, 2010 Moderators Posted October 20, 2010 Jayson,Having a big array decrease the speed to read it ?Yes, but I am not sure that it would be noticeable to a human. If you have something that big, I do hope you going to store it as a separate file to be read in and not hard code it into the script. How are you at reading in and parsing delimited files? Should we expect a new topic soon? 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
Jayson Posted October 20, 2010 Author Posted October 20, 2010 Melba,Of course i'll wrote everything in seperate file. I'll use the script that ReFran made here. Everytime one space is found and reach # it create a subitem , double space within # subsubitem created and when it can't find any space between 2 point a Parent is created.As for your other question; Yes, i might need more help but for now i'm trully satisfied by your hard work and I'll keep coding stuff that i'm sure will work for now Big THANK to you again !
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