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

radsplitbutton get rid of image column

2 Answers 41 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 18 Nov 2012, 05:25 PM
Hi, i'm populating a radsplitbutton in code.  the items show up fine, but there's a blue strip on the left side of the menu that drops down with the items in it.  It's where the images go.  I don't have any images.  how do i get rid of this strip?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 21 Nov 2012, 05:01 PM
Hello John,

Thank you for writing.

If you just want to remove the blue strip while keeping the space between the text of the items and the left edge of the menu, you should follow this snippet:

RadDropDownMenuElement ddMElement = (RadDropDownMenuElement)this.radSplitButton1.DropDownButtonElement.DropDownMenu.RootElement.Children[0];
ddMElement.Children[2].Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

If you additionally want to remove the space between the text and the left edge of the menu, you should add this:
RadDropDownMenuLayout ddMLayout = (RadDropDownMenuLayout)ddMElement.ScrollPanel.ScrollLayoutPanel.Children[3];
ddMLayout.LeftColumnMinWidth = 0;

I hope this helps. Let me know if you have additional questions.Greetings,
Nikolay
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
John
Top achievements
Rank 1
answered on 25 Nov 2012, 08:05 PM
Thank you, that got it.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
John
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
John
Top achievements
Rank 1
Share this question
or