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

RadListBox border

5 Answers 86 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Steven
Top achievements
Rank 1
Steven asked on 09 Jun 2007, 08:58 PM
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

5 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 11 Jun 2007, 10:41 AM
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
0
Steven
Top achievements
Rank 1
answered on 11 Jun 2007, 07:02 PM
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
0
Georgi
Telerik team
answered on 12 Jun 2007, 02:23 PM
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
0
Jesse Lawler
Top achievements
Rank 1
answered on 12 Sep 2010, 05:50 AM
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
0
Nikolay
Telerik team
answered on 17 Sep 2010, 04:18 PM
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
Asked by
Steven
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Steven
Top achievements
Rank 1
Jesse Lawler
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or