taotao878 Posted November 2, 2007 Share Posted November 2, 2007 (edited) How do I create one TreeView as NSIS ? NSIS's TreeView has tip, when your mouse is hovered over the the TreeView's Item and subitem, the Tip text will be displayed in the Label. e.g. Manage Current Attachments (1) Edited November 2, 2007 by taotao878 Link to comment Share on other sites More sharing options...
BrettF Posted November 2, 2007 Share Posted November 2, 2007 Look at using _ControlHover () Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
taotao878 Posted November 2, 2007 Author Share Posted November 2, 2007 Thank you very much! I try it at once. Link to comment Share on other sites More sharing options...
BrettF Posted November 2, 2007 Share Posted November 2, 2007 This topic may also help. I will see about getting an example done for you Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
taotao878 Posted November 3, 2007 Author Share Posted November 3, 2007 This topic may also help. I will see about getting an example done for you Sorry, I try it, but I can not solve this problemPlease help me! Link to comment Share on other sites More sharing options...
BrettF Posted November 3, 2007 Share Posted November 3, 2007 I have just tried, yet alas, It doesn't work. I am afraid I don't know what else can be done by me. I'll leave it to someone smarter to tell you a fix... If they are willing. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
ericg32 Posted November 3, 2007 Share Posted November 3, 2007 Did you look at GUICtrlSetTip -------------------------------------------------------------------------------- Sets the tip text associated with a control. GUICtrlSetTip ( controlID, tiptext [, "title" [, icon [, options]]]]] ) Link to comment Share on other sites More sharing options...
Siao Posted November 3, 2007 Share Posted November 3, 2007 (edited) The actual display on hover is pretty easy, it's harder to come up with a nice way to keep the whole thing (items, text, descriptions) organized. Which is something that I feel the example below is somewhat lacking, but it works. Using GuiTreeView UDF from latest beta. expandcollapse popup#include <GuiTreeView.au3> Opt("GUIOnEventMode", 1) $sTitle = "Treeview item descriptions" $hGui = GUICreate($sTitle, 400, 300, -1, -1, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "SysEvents") GUISetOnEvent($GUI_EVENT_MOUSEMOVE, "SysEvents") Global $aTreeItemText[6][2] = [["Item 1", "This is item 1"], _ ["Item 1A", "This is item 1A"], _ ["Item 1B", "This is item 1B"], _ ["Item 2", "This is item 2"], _ ["Item 2A", "This is item 2A"], _ ["Item 2B", "This is item 2B"]] $cTree = GUICtrlCreateTreeView(10,50,200,200, -1, $WS_EX_CLIENTEDGE) $cTreeItem_1 = GUICtrlCreateTreeViewItem($aTreeItemText[0][0], $cTree) $cTreeItem_1A = GUICtrlCreateTreeViewItem($aTreeItemText[1][0], $cTreeItem_1) $cTreeItem_1B = GUICtrlCreateTreeViewItem($aTreeItemText[2][0], $cTreeItem_1) $cTreeItem_2 = GUICtrlCreateTreeViewItem($aTreeItemText[3][0], $cTree) $cTreeItem_2A = GUICtrlCreateTreeViewItem($aTreeItemText[4][0], $cTreeItem_2) $cTreeItem_2B = GUICtrlCreateTreeViewItem($aTreeItemText[5][0], $cTreeItem_2) Global $hTree = GUICtrlGetHandle($cTree) GUICtrlCreateGroup(" Description: ", 220, 50, 170, 200) $cInfoLabel = GUICtrlCreateLabel("", 230, 70, 150, 170) GUICtrlCreateGroup ("",-99,-99,1,1) GUISetState() While 1 Sleep(1000) WEnd Func SysEvents() Switch @GUI_CtrlId Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MOUSEMOVE ; $aHwnd = DllCall("user32.dll", "hwnd", "WindowFromPoint", "uint", MouseGetPos(0), "uint", MouseGetPos(1)) If (IsDeclared("hTree") = 0) Or ($aHwnd[0] <> $hTree) Then ContinueCase $hItem = TreeItemFromPoint($hTree) If $hItem = 0 Then GUICtrlSetData($cInfoLabel, "") Else $sTitle = _GUICtrlTreeView_GetText($hTree, $hItem) $sDesc = "" For $i = 0 To UBound($aTreeItemText)-1 If $aTreeItemText[$i][0] = $sTitle Then $sDesc = $aTreeItemText[$i][1] ExitLoop EndIf Next GUICtrlSetData($cInfoLabel, $sDesc) EndIf EndSwitch EndFunc ;Returns handle of tree item under mouse: Func TreeItemFromPoint($hWnd) Local $tMPos = _WinAPI_GetMousePos(True, $hWnd) Return _GUICtrlTreeView_HitTestItem($hWnd, DllStructGetData($tMPos, 1), DllStructGetData($tMPos, 2)) EndFunc Edited November 3, 2007 by Siao "be smart, drink your wine" Link to comment Share on other sites More sharing options...
taotao878 Posted November 3, 2007 Author Share Posted November 3, 2007 Thank you very much ! I try it, and my problem has been solved. Thank again. Link to comment Share on other sites More sharing options...
dabus Posted March 5, 2008 Share Posted March 5, 2008 This great stuff. Thx big time. 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