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
945
text on top of an ultraActivityIndicator
posted

I introduced an ultraActivityIndicator into my application, and wanted to put some status text on top of the control to show the user the state of a particular process while they were waiting.

Anyhow, the ultraActivityIndicator does not seems to have a text property like a progressbar, so i proceeded to place an ultralabel over the control. I set it background color to transparent hoping that the marquee effect would appear along with the text on th elabel.

When i run the form, the label and its text will appear but the background color of the label is set to the forms background color and not the marquee.

Am i expecting too much from the label....I suppose i could add to the paint event on the ultraActivityIndicator

  • 20872
    Offline posted

    Hello Raymond,

    I have sent your feature request directly to our product management team.  Our product team chooses new feature requests for development based on popular feedback from our customer base.  Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.

     

    We value your input, and our philosophy is to enhance our toolset based on customer feedback.  If your feature is chosen for development, you will be notified at that time.  Your reference number for this feature request is FR12777.

     

    If you would like to follow up on your feature request at a later point, you may contact Developer Support management via email.  Please include the reference number of your feature request in the subject and body of your email message.  You can reach Developer Support management through the following email address:  dsmanager@infragistics.com

     

    Thank you for your request.

     

  • 6158
    Suggested Answer
    Offline posted

    Hello,

    When the BackColor is set to Transparent, the UltraLabel (like other .NET controls) will inherit is BackColor for its parent container which is why your label was showing the form's BackColor.

    The easiest solution to apply text to the UltraActivityIndicator is via a DrawFilter.

            public class UltraActivityIndicatorTextDrawFilter : Infragistics.Win.IUIElementDrawFilter
            {
                #region Members
    
                private Font font;
                private string text = string.Empty;
                private SizeF textSize;
    
                #endregion //Members
    
                #region Constructor
    
                public UltraActivityIndicatorTextDrawFilter(string text, Font font)
                {
                    this.text = text;
                    this.font = font;
                }
    
                #endregion //Constructor
    
                #region IUIElementDrawFilter Members
    
                public bool DrawElement(Infragistics.Win.DrawPhase drawPhase, ref Infragistics.Win.UIElementDrawParams drawParams)
                {
                    Infragistics.Win.UltraActivityIndicator.MarqueeIndicatorUIElement marqueeElement = drawParams.Element as Infragistics.Win.UltraActivityIndicator.MarqueeIndicatorUIElement;
                    if (marqueeElement != null &&
                        this.text != String.Empty)
                    {
                        if (this.textSize.IsEmpty)
                            this.textSize = drawParams.Graphics.MeasureString(this.text, this.font);
                        Rectangle workRect = marqueeElement.RectInsideBorders;
                        drawParams.Graphics.DrawString(this.text, this.font, drawParams.TextBrush, new PointF(workRect.Right - (workRect.Width + this.textSize.Width) / 2, workRect.Bottom - (workRect.Height + this.textSize.Height) / 2));
                    }
                    return false;
                }
    
                public Infragistics.Win.DrawPhase GetPhasesToFilter(ref Infragistics.Win.UIElementDrawParams drawParams)
                {
                    if (drawParams.Element is Infragistics.Win.UltraActivityIndicator.MarqueeIndicatorUIElement)
                        return Infragistics.Win.DrawPhase.AfterDrawElement;
                    else
                        return Infragistics.Win.DrawPhase.None;
                }
    
                #endregion
            }
    

     

    If you would like to see a Text property added to the UltraActivityIndicator, I would suggest entering a Feature Request to bring this functionality to the attention of our product management. If you require further assistance, please let me know.

    Thanks,

    Chris