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

Display issue with a RadSplitButtonElement in a RadRibbonBar

2 Answers 128 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Fraser Tustian
Top achievements
Rank 1
Fraser Tustian asked on 19 Jan 2009, 04:35 AM
Greetings!

I'm having a display issue when using a RadSplitButtonElement in a RadRibbonBar. I'm hoping that I'm just missing something simple and somebody can help me. Here is a walkthrough to reproduce the issue:

  1. Create a new Windows application
  2. Drop a RadRibbonBar onto the form
  3. Click "Add New Tab" and name it "Test"
  4. Click "Add New Chunk..." under Test
  5. Right click the New Chunk and click "Add an item" > "Horizontal Button Group"
  6. Right click the space inside the new group and click "Add an item" > "RadSplitButtonElement"
  7. Select the new "RadSplitButtonElement1" and from the Properties window, click the ellipsis button for the Image property.
  8. Pick a 32x32 bitmap. For example, Common7\VS2008ImageLibrary\1033\Objects\png_format\WinVista\Annotation_New.png that comes with Visual Studio 2008
  9. Change the TextImageRelation property to "ImageAboveText"

You can now see the button in the ribbon. The image is there, but the text has disappeared - it is (I assume) beneath the image, but the button has sized itself to the height of the image alone (rather than the image height plus the text height), so the text cannot be seen.

When I change the image to a 16x16 image (for example, Common7\VS2008ImageLibrary\1033\Objects\24bit_bitmaps\camera.bmp), the top of the text can now be seen but it still appears to be cropped as if the button is being resized based on the height of the image alone.

I put the RadSplitButtonElement into a RadRibbonBarButtonGroup because I couldn't find a way for the UI to offer me the option of adding a RadSplitButtonElement except for into a RadRibbonBarButtonGroup.

Is there a bug at work here or (more probably) am I doing something wrong?

Thanks!

Cheers,

FRASER TUSTIAN



Specs:
OS: Windows Vista SP1
.NET Version: 3.5
Telerik Libraries Referenced:
Telerik.WinControls.dll   8.0.0.0
Telerik.WinControls.UI.dll  8.0.0.0
TelerikCommon.dll   8.0.0.0

2 Answers, 1 is accepted

Sort by
0
Fraser Tustian
Top achievements
Rank 1
answered on 19 Jan 2009, 05:17 AM
One further thought...

When I have this issue and the image is a large one (such as the 32x32 "Annotation_New.png" file), then when I've tried to cheat it by setting the button's MinSize to - say - 70 in order to force the text to appear, the text DOES appear, but if you try that you'll see that it's rendering incorrectly.

It's as if the area where the text is being rendered is not being included in the button's rendering: the button's background is not being drawn under the text, either when idle nor when the user hovers the mouse over it.

Hope that makes sense! This is the workaround that I'm currently using to at least get the image and text to display in a RibbonBar, but it does look a bit clunky!

Cheers,

FRASER TUSTIAN
0
Nick
Telerik team
answered on 22 Jan 2009, 07:17 AM
Hello Fraser Tustian,

Thank you for your question. I have updated your Telerik points for reporting this issue.

You can use Size instead of MinSize with limited success, for example:

this.radSplitButtonElement1.Size = new Size(500, 600); 

I have logged the issue and we are currently working on improving our RibbonBar for Q1 2009. I hope that this one will make it for the same release.

Do not hesitate to write me back if you have further questions.

Regards,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
RibbonBar
Asked by
Fraser Tustian
Top achievements
Rank 1
Answers by
Fraser Tustian
Top achievements
Rank 1
Nick
Telerik team
Share this question
or