I have a Ribbon (UltraWinToolbar) with 3 TextBoxTools on it in a vertical arrangement a bit like:
| Short Caption: [xxxxxxxxxxxxxxxxxxxxxx] | | Very Long Caption Indeed: [xxxxxxxxxxx] | | Tiny: [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] |
But I want it to look like this:
| Short Caption: [xxxxxxxxxxx] | | Very Long Caption Indeed: [xxxxxxxxxxx] | | Tiny: [xxxxxxxxxxx] |
How can I control the width of the edit area? Using 2010.3 but can upgrade to 2011.2 if required.
Hi Sam,
I have found that this behavior only appears to be produced when TextBoxTools are displayed within the ApplicationMenu of the UltraToolbarsManager; which contains these tools within the context of a popupmenu.
There is no property extended from the UltraToolbarsManager for explicitly adjusting the position of these tools, but you should be able to manipulate their placement with the implementation of a CreationFilter.
I am currently developing one such approach and I will post my solution to this thread, when successful.
If you have any further questions at all in the meantime, please let me know.
Sincerely,Chris KDeveloper Support EngineerInfragistics, Inc.www.infragistics.com/support
Chris,
Thanks. I have found that setting the SharedProps.Width to -1 makes the tools line-up properly. However this does not allow us to control the width of the text input area. Setting SharedProps.MinWidth just changes the gap between the label and the text entry area.
I have attached the sample demonstrating the CreationFilter implementation that I mentioned yesterday.
In this approach, I have also extended the ability to modify both the ApplicationMenu’s LeftToolsArea and the TextEditor width.
Please find the sample attached.
If you have any questions at all regarding this implementation, please let me know.
Thanks, I can understand your approach here, unfortunately I couldn't get your code to work on my Ribbon.
I think there is an issue with the rect.X calculation. I have changed it to:
//Offset the rect position using the width of its parent container less the desired width of the textEditor, subtract 2 from this quantity
rect.X += rect.Width - textEditorWidth;
and it now works, I don't quite understand the purpose of the LeftToolsAreaRight it never seems to get set on my Ribbon.
--
Sam
Your certainly welcome. The variable name LeftToolsAreaRight was meant to indicate the right border of the ApplicationMenuLeftAreaUIElement and this is the x-axis position that it references; but it was not intended to actually be used for modifying the ToolLeftArea's width, this may have been ambiguous in the sample.
This was used in the calculation to determine the appropriate distance from the right border, (in addition to the 2 unit buffer) for the textEditor’s UIElement; when this elements width is considered.
For modifying the width of the ApplicationMenu.ToolAreaLeft, I would recommend modifying the MinWidth as demonstrated in the sample’s load event, (ultraToolbarsManager1.Ribbon.ApplicationMenu.ToolAreaLeft.MinWidth = <desired width>;).
If you have any further questions regarding this implementation, please let me know.