Hello
In my Ribbon's QAT, I have some custom controls, one of which is a text box. I want this text box to resize depending on how much room is available
.So for instance, the text box would initially fill up the remaining space, but if the user added a favourite to their QAT, the text box would then shrink just a little to allow room for the new favourite.
Is there a way I can either
a) have the ribbon resize this control depending on available space
b) have the ribbon tell me how much space is left available on the QAT before it starts to move stuff down onto the second row.
You can do this on regular toolbars by setting InstanceProps.Spring to True on the TextBoxTool when the owning toolbar has Settings.FillEntireRow set to True. However, the QAT does not allow resizable tools to spring like this. I just took a quick look at the Office 2007 UI Guidelines, and doing that with the QAT does not seem to go against them, so I would recommend submitting a feature request for this: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.
As for the second part of your question, you would have to manually determine the amount of space available. You can do this by getting the ui element for the QAT and examining its parent element. Based on their Rect values and the other children of the parent element, you should be able to determine the available space:
UIElement element = this.ultraToolbarsManager1.Ribbon.QuickAccessToolbar.UIElement;
if ( element != null ){ UIElement topElement = element.GetAncestor( typeof( QatTopAreaUIElement ) );
if ( topElement != null ) { UIElement captionAreaElement = topElement.Parent;
// Determine which other elements are in the caption area and how much space is available. }}