Print Page | Close Window

don’t show context menu for toolbars

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=965
Printed Date: 02 July 2025 at 1:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: don’t show context menu for toolbars
Posted By: Joe Brown
Subject: don’t show context menu for toolbars
Date Posted: 21 July 2004 at 2:54pm
I'm trying to figure out how to make the context menu for toolbars not appear. I right click in the toolbar area of my app, a context menu appears with checkboxes next to the toolbars that are visible, and I can turn them on and off.



Replies:
Posted By: Slotter
Date Posted: 29 July 2004 at 8:50pm
I couldn't figure out how to do it via existing code, so I modified the library as such:

In XTPCommandBars.h, class XTP_COMMANDBARS_OPTIONS,XTP_COMMANDBARS_OPTIONS() {} block, add
     bToolBarContext = TRUE;

In XTPCommandBars.cpp, CXTPCommandBars::ContextMenu function, add
     if (!GetCommandBarsOptions()->bToolBarContext)
           return;
before
     CXTPPopupBar* pPopup = GetToolbarsPopup();

Then in your program, just do

CXTPCommandBars* pCommandBars = GetCommandBars();
pCommandBars->GetCommandBarsOptions()->bToolBarContext = FALSE;     


Posted By: gteet
Date Posted: 30 July 2004 at 5:03pm
check out CXTPToolBar::SetCloseable, available in XTP 9.00



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