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 » Ribbon bar sample code help Collapse All
Subject Author Date
Robert Webb Jul 14, 2008 - 8:47 PM

Hi, I have some questions in trying to understand the ribbon bar sample code.  Unfortunately none of this seems to be documented.


- CmdKeyTipSet() is used throughout the sample code.  Sometimes I can see that it tells the GUI what tip to display after Alt is pushed.  But other times the tip never seems to display.  Eg "ZC" is given as the key tip for several different nodes.  What’s going on here?


- I don’t quite follow how the formatting rules work.  Is there documentation for this anywhere?  Firstly there are effective and visual rules.  To me visual means how it looks and effective is how it acts, but formatting is entirely visual isn’t it?  Secondly there are rules for small, normal and large, but button icons in the ribbon bar sample seem to only ever adjust between two sizes.


Thanks,

Rob.

Technical Support Jul 15, 2008 - 1:52 PM

Ribbon bar supports both tool tip like key tips and classic keyboard accelerators. Keyboard accelerators are specified in accelerator resource table. Key tips and all the other ribbon specific features are specified from code. It’s recommended to design different key tips for all the ribbon buttons displayed at one level. Ribbon buttons from different levels may have equal key tips.

The ribbon button behavior is defined by its Effective Informativeness Level (ILE) and Visual Informativeness Level (ILV).

ILV is simpy 0, 1 and 2 constants which define small, middle and large button layout:

	#define __EXT_RIBBON_ILV_SIMPLE_SMALL			0
	#define __EXT_RIBBON_ILV_SIMPLE_NORMAL			1
	#define __EXT_RIBBON_ILV_SIMPLE_LARGE			2

ILE is constant in more wide range:
	#define __EXT_RIBBON_ILE_MIN					0
	#define __EXT_RIBBON_ILE_MAX					10

Each ribbon button has both ILV and ILE as its properties. It also have array of ILE-ILV pair values which define button’s behavior. Initially ribbon button has maximal ILE value. If there is not enough space in the ribbon bar to display buttons, then ILE of each ribbon button becomes smaller and array of ILE-ILV pairs is used to find new button’s ILV. This is how buttons change their visual look (it’s ILV) when ribbon bar become resized.