RadListBox border

6 posts, 0 answers
  1. Steven
    Steven avatar
    28 posts
    Member since:
    May 2007

    Posted 09 Jun 2007 Link to this post

    Uhmmmm .. I hate to sound like a broken record :) but where is the option to set the border to the RadListBox to none?

    Steven Hodson
    WinExtra / Hodson Report
    http://www.winextra.com
    http://www.hodsonreport.com
  2. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 11 Jun 2007 Link to this post

    Well, actually we are at fault here, Steven. As you have noticed, the documentation needs quite a bit of work, so it is of no surprise that we get such questions. Until we fix the docs, feel free to ask your questions here - we will be glad to help.

    You can set RadListBox's Visibility property to Hidden or Collapsed through:
    1. A Theme - create a new theme (or use your current one) and set the property in it. You can use the Visual Style Builder to help you with this task.
    2. In VS2005 design-time - use the Children collection on the RootElement, and then in RadListBoxElement.
    3. In your code:
      this.radListBox1.RootElement.GetChildAt(0).GetChildAt(1).Visibility = Telerik.WinControls.ElementVisibility.Hidden;

    I hope this helps!

    Georgi

    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Steven
    Steven avatar
    28 posts
    Member since:
    May 2007

    Posted 11 Jun 2007 Link to this post

    I'm not sure I am following this very well.

    By default the RadListBox has a 1px border that displays around the whole control - not the individual listbox items - what I want is for the border to either be set to none or possibly 3D .. like the default MS ListBox control has the Border option

    Steven Hodson
    WinExtra / Hodson Report
    http://www.winextra.com
    http://www.hodsonreport.com
  5. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 12 Jun 2007 Link to this post

    Hello Steven,

    Indeed, this is the case that I tried to explain in my previous reply. Sorry if I did not express myself properly. Basically, my previous post covers the three different ways to make the border disappear.

    If you wish to change its appearance though, then the recommended way is to tune its theme by using the VisualStyleBuilder tool. You could use one of the standard themes as a starting point and modify it. To learn more on using the VisualStyleBuilder, please review at our help topics "Working With Styles & Themes" and "Styling the Telerik RadListBox". You can also review the two videos we have on the VisualStyleBuilder.

     
    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Jesse Lawler
    Jesse Lawler avatar
    46 posts
    Member since:
    Apr 2010

    Posted 12 Sep 2010 Link to this post

    I'm assuming since it's been over three years since the last post in this thread, Telerik might have come up with a simple way to remove the border around the RadListBox?  Yes?

    Why doesn't setting BorderStyle="none" work?

    Thanks,

    Jesse
  7. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 17 Sep 2010 Link to this post

    Hello Jesse Lawler,

    Our controls are based on a specially designed framework - Telerik Presentation Framework. You can read more about it here. So, each visual element follows the properties and rules of this framework. For example, the border of the RadListBox is painted by a base element in the TPF - BorderPrimitive. So, in order to control the behavior of the border, you should actually modify this BorderPrimitive. Please refer to this article which concerns the special designer that we have for the base elements building RadControls.

    Sincerely yours,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready