This is a migrated thread and some comments may be shown as answers.

Button text disappears on resize

5 Answers 738 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
RAG
Top achievements
Rank 1
RAG asked on 14 Feb 2013, 01:58 AM
Dear Telerik team,

I have an issue and I can't find the right button property to set.

See my two attached screenshots: The first one shows the buttons as they should be displayed. The second one shows the problem that appears when I resize my form. Shortly before the button groups collapse, the buttons loose their text. As you can see, some of the buttons still have their text, but they also disappear on making the form smaller. My buttons do have StretchVertically and StretchHorizontally on true, but it didn't change anything setting them on false. Nor playing with the minSize and size attributes.

Can you help me, please?

Thanks in advance!
Regards
Fabian

5 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 18 Feb 2013, 02:36 PM
Hello Fabian,

Thank you for writing.

The observed behavior is the desired behavior in RadRibbonBar. When you reduce the control size it will start collapsing its elements in order to adjust itself to the new size. If you keep reducing the size after the text is hidden, the control will continue hiding its elements - see attached video.

I hope that you find this information useful.

Greetings,
Stefan
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
RAG
Top achievements
Rank 1
answered on 18 Feb 2013, 03:08 PM
Hello Stefan,

thanks for the video!

What I don't understand is, why do captions disappear when using image buttons, but not when using radio buttons. Is there any way to set the radio button behaviour for image buttons? I attached two new screenshots, to show you what I mean. :)

Regards!
Fabian
0
Stefan
Telerik team
answered on 21 Feb 2013, 09:17 AM
Hi Fabian,

Thank you for writing back.

The collapse operation in RibbonBar is performed in the ExpandableStackLayout class and each item in it that inherits from the CollapsibleElement class can be expanded or collapsed. By default, ExpandableStackLayout checks whether the sum of all sizes of the elements is larger than the available space and calls the CollapseToStep method for these elements with CollapseStep smaller than CollapseMaxSteps. There is a property of the RibbonBarGroup, which can be set to determine when the group should be collapse - see the CollapsingPriority property. The higher this is the, the higher its collapsing priority is. In your case, you can set the CollapsingPriority of the group containing your radio button to a small number to make it disappear last. 

On a collapsible element as RadButtonElement, the text of it will be hidden first, then considering that the button has both LargeImage and SmallImage, the LargeImage will be hidden, displaying the SmallImage, and only then the element will be collapsed. However, this is not valid for radio buttons since leaving such with hidden text (just the small circle) will make no use for the users, thus the whole element is hidden.

I hope that you find this information useful.
 

Kind regards,
Stefan
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
RAG
Top achievements
Rank 1
answered on 21 Feb 2013, 02:27 PM
Hi Stefan,

thank you for answering!

That means, please correct me if I'm wrong, a RadButtonElement collapses in several steps and the first step is the disappearing text. Or is there any way I can tell the button only to be collapsed or full visible? With no intermediate state?

Regards,

Fabian

PS: Please do not hesitate to ask, if something I wrote sounds confusing - I'm no native english writer. :)
0
Stefan
Telerik team
answered on 26 Feb 2013, 11:58 AM
Hi Fabian,

If a RadButtonElement has applied LargeImage, SmallImage and Text, the text will be hidden first, than the LargeImage and then the button will be collapsed.

The only way to make a button collapse is if it does not have the LargeImage and the SmallImage properties set. 

Kind regards,
Stefan
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
RibbonBar
Asked by
RAG
Top achievements
Rank 1
Answers by
Stefan
Telerik team
RAG
Top achievements
Rank 1
Share this question
or