RadTrackBarElement Back color

3 posts, 0 answers
  1. Steven
    Steven avatar
    10 posts
    Member since:
    Mar 2011

    Posted 24 Oct 2011 Link to this post

    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. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 27 Oct 2011 Link to this post

    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.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Steven
    Steven avatar
    10 posts
    Member since:
    Mar 2011

    Posted 27 Oct 2011 Link to this post

    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
Back to Top