Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Question about Submenu of Toolbar button behaviour Collapse All
Subject Author Date
Ed Grochowski Sep 11, 2006 - 3:56 PM

Following your article entitled "How to create a toolbar button with a submenu", we created a CExtToolControlBar in which one of the tabbed toolbars has a button with a submenu of buttons.
This all seems to work fine, with the exception of a particular behaviour which we would like to change.

Right now, when you first run the program and select the toolbar button’s split button arrow, it pops up a downward pointing chevron only. We must either hover over the chevron, or select it, to show all the drop down menu items. If I choose one of the drop down items, and then go back and reselect the toolbar split button, it now shows the downward pointing chevron AND the last item I selected. In other words, it will show the chevron, plus any drop down sub menu items which have been selected since I launched the program.

I noticed in your bitmap editor program, that your drop down items always appear in their entirety, without any chevrons. Although, I havent been able to discern which setting or code controls this behaviour.

Can you tell me what I have to do to have our program always display the full set of drop down button items, without any chevrons, much like your bitmap editor sample?

If it makes any difference, we are using ProfUIS 2.54.

Suhai Gyorgy Sep 12, 2006 - 1:39 AM

The FAQ you need is: How to implement expandable menus?. the SetBasicCommands works like this:

static UINT statBasicCommands[] =
{
	ID_MY_COMMAND1,
	ID_MY_COMMAND2,
	ID_MY_COMMAND3,
	...
	ID_MY_COMMAND_N,
	0 // end of commands list
}; // statBasicCommands array

	g_CmdManager->SetBasicCommands( pApp->m_pszProfileName, statBasicCommands);
But don’t forget: - you should use either SetBasicCommands, or setting those styles to false.
- Whichever way you choose, it has effect on all menus in your application.

Ed Grochowski Sep 12, 2006 - 10:54 AM

Using the following did the trick.

CExtPopupMenuWnd::g_bMenuExpanding = false;
CExtPopupMenuWnd::g_bMenuHighlightRarely = false;


Thanks