Modify

Opened 14 years ago

Closed 14 years ago

#1258 closed Bug (Fixed)

TreeView + ContextMenu versus Own window Titlebar.

Reported by: anonymous Owned by: Valik
Milestone: 3.3.1.5 Component: AutoIt
Version: 3.3.0.0 Severity: Blocking
Keywords: TreeView ContextMenu TitleBar Cc:

Description

left mouse click on window titlebar,
directly after opening a treeView contextMenu item,
triggers contextMenu of window titlebar.

not sure if there are any other gui items that have this side effect.
GUICtrlCreateContextMenu example at leased not.

Environment = 3.3.0.0 under WIN_XP/Service Pack 3 X86
AutoIt:3.3.1.4 (Os:WIN_XP/X86/Service Pack 3 Language:0409 Keyboard:00000409 Cpu:X86)

;left mouse click on window titlebar,
;directly after opening a treeView contextMenu item,
;triggers contextMenu of window titlebar.
;
;not sure if there are any other gui items that have this side effect.
;GUICtrlCreateContextMenu example at leased not.
;
;Environment = 3.3.0.0 under  WIN_XP/Service Pack 3 X86
;AutoIt:3.3.1.4   (Os:WIN_XP/X86/Service Pack 3   Language:0409 Keyboard:00000409 Cpu:X86)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <TreeViewConstants.au3>
#include <StaticConstants.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
	Local $treeview, $generalitem, $aboutitem
	Local $msg, $item, $hItem
	Local $treeview_cc,$generalitem_cc

	GUICreate("My GUI with treeview", 350, 215)

	$treeview = GUICtrlCreateTreeView(6, 6, 100, 150, _
BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)
	$generalitem = GUICtrlCreateTreeViewItem("General", $treeview)
    $aboutitem = GUICtrlCreateTreeViewItem("About", $generalitem)

	$treeview_cc = GUICtrlCreateContextMenu($treeview)
	GUICtrlCreateMenuItem('$treeview_cc', $treeview_cc)

	$generalitem_cc = GUICtrlCreateContextMenu($generalitem)
	GUICtrlCreateMenuItem('$generalitem_cc', $generalitem_cc)

	GUISetState()
	While 1
		$msg = GUIGetMsg()
		Select
			Case $msg = $GUI_EVENT_CLOSE
				ExitLoop

		EndSelect
	WEnd

	GUIDelete()
EndFunc   ;==>Example

Attachments (0)

Change History (5)

comment:1 Changed 14 years ago by Valik

  • Resolution set to Works For Me
  • Status changed from new to closed

Everything works for me. I do not see what you claim happens.

comment:2 Changed 14 years ago by Bowmore

I can confirm the behaviour reported by anonymous with AutoIt:3.3.1.4 (Os:WIN_XP/X86/Service Pack 3

Steps:

1 - ACTION: Right click on tree-view item

RESULT: Tree-view context menu appears

2 - ACTION: Left click on window title-bar

RESULT: Tree-view context menu disappears and the window context menu appears as if you had right clicked

comment:3 Changed 14 years ago by Valik

  • Resolution Works For Me deleted
  • Status changed from closed to reopened

Now that I can reproduce.

comment:4 Changed 14 years ago by Valik

  • Severity changed from None to Blocking

comment:5 Changed 14 years ago by Valik

  • Milestone set to 3.3.1.5
  • Owner set to Valik
  • Resolution set to Fixed
  • Status changed from reopened to closed

Fixed by revision [5354] in version: 3.3.1.5

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Valik.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.