Sign in to follow this  
Followers 0
argumentum

the "close" tool tip OnAutoitExit

7 posts in this topic




argumentum,

I have never seen a tooltip when exiting. To make sure we are all looking at the same thing, can you please provide a script which shows this behaviour? :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

argumentum,

I have never seen a tooltip when exiting. To make sure we are all looking at the same thing, can you please provide a script which shows this behaviour? :)

M23

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.10.2
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ###
$hForm = GUICreate("Some caption", 266, 135, 211, 141)
$hEdit = GUICtrlCreateEdit("", 8, 8, 249, 121, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY))
GUICtrlSetData(-1, "some text")
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

this example produces a "Close" tooltip under the cursor after a second or so of closing the script, compiled or not compiled.

Is the same tooltip that appears under the cursor when hovering over the "X" to close the GUI

Edited by argumentum

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Confirmed. If you hoover over the "X" in the right upper corner, there appears a tooltip "close".

This tooltip has a little delay. If you press X at once, the tool tip appears after the window has closed.

If you exit by ESC, no tooltip appears.

Solution:

Case $GUI_EVENT_CLOSE
            GUIDelete($hForm)
            Exit
Edited by Exit

My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

 

Confirmed. If you hoover over the "X" in the right upper corner, there appears a tooltip "close".

This tooltip has a little delay. If you press X at once, the tool tip appears after the window has closed.

If you exit by ESC, no tooltip appears.

Solution:

Case $GUI_EVENT_CLOSE
            GUIDelete($hForm)
            Exit

yes, exactly.

Edit: dude, I love you !. I've been after this for years. I never put 2 and 2 together. Thanks so very much.

Melba23, thank you too for your prompt attention.

Edited by argumentum

Share this post


Link to post
Share on other sites

argumentum,

I only get the tooltip if I hover over the [X] for a few seconds. Even if it is being displayed it vanishes immediately I click the [X]. As I said I have never seen a tooltip under those conditions - but if deleting the GUI before exit prevents it on your machine, so well and good. :)

M23

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

dude, I love you !. I've been after this for years. I never put 2 and 2 together. Thanks so very much.

Thanks for your compliment. :thumbsup:

1 person likes this

My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • Trolleule
      By Trolleule
      Hi,
      i want to display a tooltip when i hover over the listview group. It sounds not difficult but i couldn't find a solution and i searched for autoit as well as for c# :/
      So i came up with a not so pretty solution:
      #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <GuiToolTip.au3> #include <WinAPI.au3> Global $idListview, $hWndListView Global $hToolTip = _GUIToolTip_Create(0, BitOR($_TT_ghTTDefaultStyle, $TTS_BALLOON)); balloon style tooltip Global Const $LVN_GROUPINFO = ($LVN_FIRST - 88) Global Const $tagNMLVGROUP = $tagNMHDR & ";int iGroupId;uint iNewState;uint iOldState" ; $LVGS_flags $LVGS_flags Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $tInfo, $tNMHDR = DllStructCreate($tagNMHDR, $lParam), $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) Local $iIDFrom = DllStructGetData($tNMHDR, "IDFrom"), $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode ; Case $of?????? ; A Group was clicked <---- I need help with this Case $LVN_GROUPINFO ConsoleWrite("hier" & @CRLF) $tInfo = DllStructCreate($tagNMLVGROUP, $lParam) _DebugPrint("$LVN_GROUPINFO" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->GroupId:" & @TAB & DllStructGetData($tInfo, "iGroupId") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "iNewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "iOldState")) Case $LVN_COLUMNCLICK ; A column was clicked $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam) _DebugPrint("$LVN_COLUMNCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_CLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @CRLF & _ "+======================================================" & @CRLF & _ "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _ "+======================================================" & @CRLF) EndFunc ;==>_DebugPrint If Not StringInStr($CmdLineRaw, "/ErrorStdOut") Then Exit MsgBox($MB_TOPMOST, @ScriptName, 'please run from the editor, thanks', 10) Example() Func Example() Local $aInfo, $hImage, $idListview $ghui = GUICreate("ListView Group COLLAPSIBLE", 400, 300) $idListview = GUICtrlCreateListView("", 30, 20, 354, 218);, BitOR($LVS_SHOWSELALWAYS, $LVS_SINGLESEL, $LVS_REPORT, $WS_CLIPSIBLINGS)) $hWndListView = GUICtrlGetHandle($idListview) ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x0000FF, 16, 16)) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Column 1", 100) _GUICtrlListView_AddColumn($idListview, "Column 2", 100) _GUICtrlListView_AddColumn($idListview, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($idListview, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 2", 1) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 3", 2) _GUICtrlListView_AddItem($idListview, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($idListview, 1, "Row 2: Col 2", 1) _GUICtrlListView_AddItem($idListview, "Row 3: Col 1", 2) ; Build groups _GUICtrlListView_EnableGroupView($idListview) _GUICtrlListView_InsertGroup($idListview, -1, 1, "Group 1", 1) ;~ _GUICtrlListView_SetGroupInfo($idListview, 1, "Group 1", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_InsertGroup($idListview, -1, 2, "Group 2") ;~ _GUICtrlListView_SetGroupInfo($idListview, 2, "Group 2", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_SetItemGroupID($idListview, 0, 1) _GUICtrlListView_SetItemGroupID($idListview, 1, 2) _GUICtrlListView_SetItemGroupID($idListview, 2, 2) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Local $apos = _GUICtrlListView_GetGroupRect($idListview, 2, $LVGGR_LABEL) Local $test = GUICtrlCreateLabel("a", 2, 2, 10, 17) Local $val = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_STYLE) Local $valex = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_EXSTYLE) Local $aha = _WinAPI_CreateWindowEx($valex+$WS_EX_LAYERED, "static", "blabla", $val, $apos[0], $apos[1], 50, 20, $hWndListView) _GUIToolTip_AddTool($hToolTip, $hWndListView, "This is a ToolTip3", $aha) GUISetState(@SW_SHOW) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Short description: I only created a label with CreateWindowEx which i can append to the listview control and layered it with the $WS_EX_Layered flag so it looks like it's transparent. Then i only added a tooltip tool to that created label.
      Hover over the Group 2 text and the Tooltip will be displayed. My question is: does someone know another perhaps much prettier solution?
      Thanks in advance
    • Sucre
      By Sucre
      I turned to Autoit from AHK just because it support WinForm Application so well. The problem often haunts me that all the application in my job is WinForm. And it indeed help my work so much. Great thanks in advance.
      However, I can't get the ToolTip text in the application of my company. Specifically,now I want to get the information about some data, however the information is all displayed in the tooltip on the scatter diagram which is made of those data.
      Is there any advice ? Relative topics I have searched can't get any information about the winform tooltip...
       
    • Trolleule
      By Trolleule
      Hey,
      i can't find a solution, to set the direction of a tool tip.
      Bootstrap demo
      see "Bottom Tooltip", thats what i try to get. Can someone help?
      #include <GUIConstantsEx.au3> #include <GUIToolTip.au3> #include <GuiTab.au3> $hGUI = GUICreate("Built-In Tab Example", 500, 500) $hTab = GUICtrlCreateTab(10, 10, 480, 480) ; Create tabitems For $i = 0 To 2 GUICtrlCreateTabItem("Tab " & $i) $aha = GUICtrlCreateButton("Button " & $i, 20 + ($i * 100), 40 + ($i * 50), 80, 30) Next ; Close Tab definiton GUICtrlCreateTabItem("") ; #TOOL TIPS# ========================================================================================================================================================================= Global $hToolTip = _GUIToolTip_Create(GUICtrlGetHandle($hTab), BitOR($_TT_ghTTDefaultStyle, $TTS_BALLOON)); ) ; default style tooltip _GUICtrlTab_SetToolTips($hTab, $hToolTip) _GUIToolTip_SetMaxTipWidth($hToolTip, 100) ; this allows multiline tooltips _GUIToolTip_AddTool($hToolTip, 0, "Reset current View.", GUICtrlGetHandle($aha)) ; ===================================================================================================================================================================================== GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd  
    • buymeapc
      By buymeapc
      Hey all,
      Hopefully an easy question...if I have a listview with tooltips enabled and I move the mouse cursor off the listview, how can I clear the tooltip? In the reproducer below, the tooltip remains in almost every circumstance - even if I minimize the gui, the tooltip still overlays other windows. I'd like it to be cleared if I'm outside of the listview, ideally.
      Thanks.
      #include <GUIConstantsEx.au3> #include <GUIListView.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("ToolTip test", 250, 200) $idListView = GUICtrlCreateListView("Column 0|Column 1|Column 2", 10, 10, 235, 175, $WS_VISIBLE, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_INFOTIP)) For $i = 0 To 5 GUICtrlCreateListViewItem(StringFormat("Item %s|abc%s|def%s", $i, $i, $i), $idListView) Next GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func WM_NOTIFY($hWnd, $IMsg, $iwParam, $ilParam) #forceref $hWnd, $IMsg, $iwParam Local $hwndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo, $gText, $aPos $hWndListView = $idListView If Not IsHWnd($hWndListView) Then $hWndListView = GUICtrlGetHandle($hWndListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hwndFrom = HWnd(DllStructGetData($tNMHDR, "hwndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "idFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hwndFrom Case $hWndListView Switch $iCode Case $LVN_HOTTRACK; Sent by a list-view control When the user moves the mouse over an item $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) $iItem = DllStructGetData($tInfo, "Item") $iSubItem = DllStructGetData($tInfo, "SubItem") If Not ($iItem = -1 Or $iSubItem = -1) Then $sText = _GUICtrlListView_GetItemText($hwndFrom, $iItem, $iSubItem) ToolTip($sText) Else ToolTip("") EndIf Return 1; the item will not be selected. EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc  
    • marsfann
      By marsfann
      Hi
      I have check tooltip function
      but, I can not find the way to change font size
      How to change tooitip font size?