OK, here's the scenario: we have a file which determines which options will be present in an mfc ribbon depending on previously chosen criterias. So, if I have a button which opens a group of other buttons, do I have do delete the items from this group before deleting the main button? It looks like MainOption->sub1, sub2...
Related
I have complicated UI created with Qt Designer. It has a hierarchy of nested widgets. I need certain tab order to switch between controls inside these widgets. But as far as I see, Qt designer allows to define tab order only within one widget. How to do it globally?
open the Edit menu and select Edit Tab Order. In this mode, each input widget in the form is shown with a number indicating its position in the tab order. you can click on the box number and change the priority.by right click you can see 3 options, start from here, restart and Tab order list.
Forgive me if this question is silly but I want to know
if there is a way to change the content of a menu bar in different
page on a stacked widget directly in qt designer.
For example I want the menu of the menu bar for page 1 of the stacked widget to be menu, inbox, multimedia, exit. For the second page I want the menu bar to contain the following menu; Text, outbox, contact, back. The reason is because
I want different menu controls for different pages of the
QstackeWidget. Is this possible from the qt designer ui or I'll have
to ultimately do it programatically?
As far as I know (which is QtCreator 3.3.0) the Creator only supports graphically inserting and editing a menu bar in QMainWindow. So for the first part of your question: Yes, you probably have to create the menus programmatically.
For the second part, it is possible to insert a menu bar in any given layout using QLayout::setMenuBar. This also includes the layout inside your stacked widget.
See also: Can you add a toolbar to QDialog?
I have added Ribbon to an existing MFC application.
The ribbon is created using the Editor.
In one of the panel I have a Custom CMFCRibbonGallery (derived from) whose contents (icon) I change dynamically. (It is much like the Styles Gallery in Excel.
After every time I change the contents I call ForceRecalcLayout which most of the time results in an Assert usually on m_pHighlighted or m_pPressed. Please see the attached snaphot1.jpeg, this Assert happened while I was moving the mouse over the Ribbon Gallery elements (Expanded mode popup) while ForceRecalcLayout was called.
On a different use case if I add the Sub Item (like we have "New Cell Style" in Styles Gallery of Excel) to the QAT using the context menu and then try to create a New cell style I get an Assert on the CMFCRibbonButton. Refer snapshot2.jpg
When just the icon changes it is sufficient to invalidate the ribbon.
Only if the size of the individual items are changed you Need to call RecalcLayout.
I see no reason to call ForceRecalsLayout.
is it possible to hide or deactivate a menu item in the file button called also jewel button? I´m able to hide completely the file button with javascript, but I want to hide or disable only some menu items in the flyout menu.
Thank you in advance
You will find these Jewel buttons within the application ribbon. You can choose to hide these buttons in your customizations.xml via some hide HideCustomActions. The names of some of the Jewel buttons you will find are:
- Mscrm.Jewel.NewMenu.NewActivity
- Mscrm.Jewel.NewMenu.NewRecord;
For example, within your appointment ribbondiffxml section within your customizations.xml, you could have a HideCustomAction like:
<HideCustomAction HideActionId="CustomHideAction.JewelMenu.NewActivity" Location="Mscrm.Jewel.NewMenu.NewActivity" />
I have an MFC app using the new UI features released in the Feature Pack and I'm having trouble with tooltips on the menubar.
By default, I beleive tooltips are not enabled on menu items. Yet whenever I hover over the 2nd item in any of the menu lists I get a tooltip with "Untitled" in the popup. The only time this does not occur is when the second item is a seperator. This only occurs on the 2nd item, not on any other item in the list. What's also odd is that a tooltip popup appears when hovering over the "Edit" top level menu item.
So to illustrate, top level menu:
File Edit View Help (Hovering over "Edit" displays the tooltip)
To Illustrate the File menu
File
New
Open
Save
Save As
(Hovering over "Open" displays the tooltip)
Again the same behavior occurs for the second item on each of the menu sections. None of the other mennu items display tooltips.
Any help on how I might be able to pin down this probelm is much appreciated.
Found the problem. Without going into the back story, I had to merge resource ID's from another project into the Resource.h file in this project. IDR_MAINFRAME was set to a value of 2 from a very old project. MFC apparently does not like 2 for this resource ID. I change it to 128 which seems to be the default value used by the new app wizard. All is well now.