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

RadTrackBar - Hiding Slider

2 Answers 120 Views
TrackBar
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 22 Jan 2015, 04:19 PM
Hi,

Is there any ability in the RadTrackBar to hide the actual slider?  I'm basically looking to use the control just for the tick marks and no visible slider or slide area.

Thanks,
Bob

2 Answers, 1 is accepted

Sort by
0
Ralitsa
Telerik team
answered on 23 Jan 2015, 03:24 PM
Hi Bob,

Thank you for contacting us. 

Yes, you can hide the indicator or line elements of RadTrackBar. Please refer to the following code snippet: 
this.radTrackBar1.LabelStyle = Telerik.WinControls.UI.TrackBarLabelStyle.TopLeft;
this.radTrackBar1.TickStyle = Telerik.WinControls.Enumerations.TickStyles.TopLeft;
 
TrackBarIndicatorElement element = (TrackBarIndicatorElement)this.radTrackBar1.TrackBarElement.BodyElement.IndicatorContainerElement.Children[0];
element.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
 
TrackBarLineElement lineElement = (TrackBarLineElement)this.radTrackBar1.TrackBarElement.BodyElement.ScaleContainerElement.Children[1];
lineElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

In attachments you can find the image which demonstrates you the result of code snippet. I also added a sample project. 

In case that is not what you want to achieve, I would kindly ask you to send me a more detailed explanation. Any additional details like screenshots or sketches would also be helpful.

Let me know if I can assist you further.

Regards,
Ralitsa
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Bob
Top achievements
Rank 1
answered on 23 Jan 2015, 03:29 PM
This is exactly what I wanted.  Thank you for the code sample.
Tags
TrackBar
Asked by
Bob
Top achievements
Rank 1
Answers by
Ralitsa
Telerik team
Bob
Top achievements
Rank 1
Share this question
or