I set the width and maxwidth on the LabelTool, but when I assign a text value to the label that is larger than the maxwidth, the label and its containing ribbon group both expand to show all of the text. What I would like to happen is have the ribbon group stay the same size and just have the label word wrap and display as multiline. I can't seem to find a maxwidth on the ribbon group itself or I would set that as well.
Craig,
Which ribbon control on which platform are you using?
I'm using Infragistics.Win.UltraWinToolbars.RibbonGroup in NetAdvantage 11.1 Win CLR2x.
Hello Craig,
Thank you for posting in our forum.
In order to set the Width of the LabelTool you need to set and MinWidth property. As long as MinWidth is set to its default value of -1, the Width will resolve to as much as necessary to draw the entire label. However after setting the MinWidth and Width the text in the LableTool will be trimmed and it cannot be wrapped.
As a workaround to wrap the label text you may use ControlContainerTool. You can put in this tool UltraLabel and format it as you need it. More about ControlContainerTool you may find by following the next link http://help.infragistics.com/Help/Doc/WinForms/2015.1/CLR4.0/HTML/Infragistics4.Win.UltraWinToolbars.v15.1~Infragistics.Win.UltraWinToolbars.ControlContainerTool.html
Please check the attached sample solution implementing this approach and let me know if you need any further assistance.
Okay. I will try that out and get back to you. Thank you.
So, what is the point of the MaxWidth property if the maximum width is dependent on the MinWidth?
Thank you for your feedback.
MaxWidth property of the tools is only honored when the tool is on a toolbar, it is not honored when the tool is on the ribbon. Please note one more workaround, in order to wrap the text, is to add new line in the string.
Please let me know if you need any further assistance whit this.
I will, thank you. I still haven't had a chance to try your suggestions yet because a higher priority task came up, but I will let you know what works. Thank you.
Hi Craig.
Please feel free to notify me when you have time to look at this.
Looking forward to your reply.
Thank you for using Infragistics Controls.
We are still following this forum thread.
Please let us know if you need our further assistance.
Okay, well it seems that task is being pushed off for the time being so would it be best to just close this thread and I can open up a new one when I get to work on that task again and get a chance to try out the suggested solution?