Modify

Opened 12 years ago

Closed 11 years ago

#2869 closed Bug (Fixed)

GUICtrlSetTip displays wrong tip message in child GUI when tabs used in parent and child GUIs

Reported by: Mungo Owned by: Jon
Milestone: 3.3.15.0 Component: AutoIt
Version: 3.3.12.0 Severity: None
Keywords: Cc:

Description

Using GUICtrlSetTip() on tab items on a parent GUI as well as on a child GUI.

The tips are displayed correctly for the parent GUI tab items but not for the child GUI tab items. The mouse over on the child GUI tab items produces the same tip messages as for the parent GUI tab items for as many (number of) tabs and tips also found in the main GUI (the first 2). This applies regardless whether tip messages are defined for tab items in the child GUI or not.

If the number of tab items with tips in the child GUI (3 tab items) is larger than in the main GUI (2 tab items), then defined tip messages are displayed correctly for those tab items (numbers) larger (in this case the 3rd tab item).
http://www.autoitscript.com/forum/topic/163891-guictrlsettip-problem-wrong-tip-message-in-child-gui-when-tabs-used-in-parent-and-child-gui/

#include <GUIConstantsEx.au3>
Opt('MustDeclareVars', 1)
Global $main_gui, $pop_gui

main_gui()

Func main_gui()
	$main_gui = GUICreate ("Gui Main - TABs and tips", 400, 400, -1, -1, -1, -1, 0)

	GUICtrlCreateTab(10, 10, 200, 100)
	GUICtrlCreateTabItem("Main Tab 01")
	GUICtrlSetTip(-1, "TAB Main 1")

	GUICtrlCreateTabItem("Main Tab 02")
	GUICtrlSetTip(-1, "TAB Main 2")

	GUICtrlCreateTabItem("")

	Local $exit = GUICtrlCreateButton("Exit", 110, 360, 80, 20)
	Local $pop  = GUICtrlCreateButton("Pop-up", 210, 360, 80, 20)
    GUISetState(@SW_SHOW)

    While 1
    Local $msg_pop = GUIGetMsg()
        Select
            Case $msg_pop = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg_pop = $exit
                ExitLoop
			Case $msg_pop = $pop
               pop_gui()
        EndSelect
	WEnd
	GUIDelete()
EndFunc

Func pop_gui()
	$pop_gui = GUICreate ("Gui Pop-up - TABs and tips", 300, 300,-1, -1, -1, -1, $main_gui)

	GUICtrlCreateTab(10, 10, 280, 100)
	GUICtrlCreateTabItem("Pop-up Tab 01")

	GUICtrlCreateTabItem("Pop-up Tab 02")
	GUICtrlSetTip(-1, "TAB Pop-up 2")

	GUICtrlCreateTabItem("Pop-up Tab 03")
	GUICtrlSetTip(-1, "TAB Pop-up 3")

	GUICtrlCreateTabItem("")

	Local $exit = GUICtrlCreateButton("Exit", 110, 260, 80, 20)
	GUISetState(@SW_SHOW)

	While 1
    Local $msg_pop = GUIGetMsg()
        Select
            Case $msg_pop = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg_pop = $exit
                ExitLoop
        EndSelect
	 WEnd
	 GUIDelete()
EndFunc

Attachments (0)

Change History (2)

comment:1 by Melba23, 11 years ago

Owner: set to Jon
Status: newassigned

comment:2 by Jon, 11 years ago

Milestone: 3.3.15.0
Resolution: Fixed
Status: assignedclosed

Fixed by revision [11410] in version: 3.3.15.0

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.