radsplitbutton get rid of image column

3 posts, 1 answers
  1. John
    John avatar
    60 posts
    Member since:
    Nov 2006

    Posted 18 Nov 2012 Link to this post

    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. Answer
    Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 21 Nov 2012 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. John
    John avatar
    60 posts
    Member since:
    Nov 2006

    Posted 25 Nov 2012 Link to this post

    Thank you, that got it.
Back to Top