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

RadTrackBarElement Back color

2 Answers 82 Views
TrackBar
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 24 Oct 2011, 04:57 PM
Hi,

I have a RadTrackBarElement hosted in a CommandBarHostItem. It displays correctly, and I have configured certain properties such as removing the tickmarks etc. However, I just cannot get the BackColor of the trackbar to take on the colour of the parent item i.e. the CommandBarStrip it is hosted in. The CommandBarHostItem.BackColor is at it's default which appears to be Color.Transparent.

How do I set the BackColor of the TrackBar so that it actually changes? If I look through VSB, it appears that RadTrackBarElement.BackColor is all that's required, but this doesn't work.

Cheers,

Steven

2 Answers, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 27 Oct 2011, 08:20 AM
Hello Steven,

Thank you for writing.

The issue with the RadTrackBar back color is a known issue, which we will address in one of our future releases. Until then you can set the back color of the RadTrackBar through the following code:

TrackBarPrimitive primitive = this.radTrackBar1.TrackBarElement.Children[0] as TrackBarPrimitive;
primitive.BackColor = Color.Transparent;

I hope this will help you. If you need further assistance, I would be glad to provide it. Kind regards,
Ivan Petrov
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

0
Steven
Top achievements
Rank 1
answered on 27 Oct 2011, 08:42 AM
Hi, that's perfect thanks, it works as expected.

Note that I am using the RadTrackBarElement directly, so the .TrackBarElement in the above code can be removed.

Cheers,

Steven
Tags
TrackBar
Asked by
Steven
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Steven
Top achievements
Rank 1
Share this question
or