Print Page | Close Window

How can let menu bar can't be dragged and moved ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=14045
Printed Date: 27 February 2025 at 2:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How can let menu bar can't be dragged and moved ?
Posted By: siwen
Subject: How can let menu bar can't be dragged and moved ?
Date Posted: 17 April 2009 at 3:49am
How can let menu bar can't be dragged and moved ?  thks



Replies:
Posted By: Oleg
Date Posted: 20 April 2009 at 2:34am
Hi,
pToolBar->EnableDocking( 0);


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ReyesRP
Date Posted: 18 June 2009 at 4:21pm
It still will not be totally immobile. If you move a toolbar above it, the menu will move down. Any way to make it always topmost?


Posted By: McMustard
Date Posted: 17 September 2009 at 4:37pm
I had this question as well.  I found the solution to be (because I did not have a CXTPToolBar pointer):

  pCommandBar->SetFlags(0, xtpFlagFloating|xtpFlagAlignTop|xtpFlagAlignLeft|
      xtpFlagAlignRight|xtpFlagAlignBottom);
  pCommandBar->SetShowGripper(FALSE);
(where pCommandBar is a CXTPCommandBar*)

The SetFlags call disables floating and limits docking to the top section.  Specifying removal of xtpFlagAlignTop prevents the user from dragging the menu bar up and down within the top docking area.  The SetShowGripper call removes the gripper, visually indicating to the user that the bar is fixed.  Also, it seems that the absence of the gripper gives the menu bar its own row.

Moving a toolbar around can displace the menu, however.  There doesn't seem to be a way to stop that.  But it does seem to mimic Visual Studio 2008's behavior, which seems like a reasonable standard, for my use anyway.

(This is a relatively old thread, but it's the only relevant one I found in searching, maybe someone will find it useful)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net