Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2715
Label on Ribbon - Can't get transparent background
posted

Hi!

I'm using IG 11.2 CLR4x, and in the application I have a Office 2007 like ribbon, on wich I'm trying to put a label. The problem is that the background of the label is not transparent (even though in its properties it is set to transparent).

What can I do ? Thank you!

Parents
No Data
Reply
  • 4618
    Suggested Answer
    posted

    Hi mismar,

    The behavior that you are observing is in fact expected behavior. The reason that the UltraLabel does not appear to apply the transparent appearance as you are expecting is that .NET controls, which many controls such as the UltraLabel are derived from do not actually support true transparency.

    In instances where you are setting the control’s background to transparent, they will actually take on the background color of their parent control.

    In this case, the label that you are using is in fact taking on the background color of its parent control, which is the form or Fill_Panel if one was implemented; the color used in this case appears to be the default background color, “Control”.

    In the following screen shot, this same behavior is demonstrated with the .NET Label, where the form's BackColor is set to blue; note how the transparent label takes on the new appearance of its parent.

     

    If you are only trying to display text within the ribbon, I would recommend using the DrawString() method extended from the graphics object of the form, within the forms paint event handler.

    Using this approach you will be able to place your text anywhere on the form while maintaining the transparency behavior that you are looking for.

    If you have any questions at all regarding this approach, please let me know.

    Sincerely,
    Chris K
    Developer Support Engineer
    Infragistics, Inc.
    www.infragistics.com/support

Children