Unplanned
Last Updated: 04 May 2020 09:51 by ADMIN
James
Created on: 01 May 2020 22:03
Category: CommandBar
Type: Bug Report
1
High DPI Issue with command bar tooltips

Just reporting problem at this time.  Do not need an immediate resolution.

Problem Found:  Tooltip text for command bar items (i.e. possibly in other tooltips outside of command bar) does not scale with the DPI setting along with the rest of the form.  Tooltip text always appears only at 100% DPI font size and not higher.

Please note:  I tested this by using two monitors set to 1) 1920x1080 at 100% scaling and 2) 3840x2160 at 200% scaling and dragging the application back and forth between the two monitors. 

1 comment
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 04 May 2020 09:51

Hello, James,

I was able to observe the problem with scaling the tool tip in our Demo application >> CommandBar >> First look example:

I have logged it in our feedback portal by making this thread public on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

Currently, the possible solution that I can suggest is to use custom drawing for the tool tip and increase the font for example as it is demonstrated below: 

        public RadForm1()
        {
            InitializeComponent();            

           this.radCommandBar1.ToolTipTextNeeded+=radCommandBar1_ToolTipTextNeeded;
        } 

        private void radCommandBar1_ToolTipTextNeeded(object sender, ToolTipTextNeededEventArgs e)
        {
            e.ToolTip.OwnerDraw = true;

            e.ToolTip.Popup -= ToolTip_Popup;
            e.ToolTip.Popup += ToolTip_Popup;

            e.ToolTip.Draw -= ToolTip_Draw;
            e.ToolTip.Draw += ToolTip_Draw;
        }
        void ToolTip_Popup(object sender, PopupEventArgs e)
        {
            e.ToolTipSize = TextRenderer.MeasureText(this.commandBarButton1.ToolTipText, new Font("Arial", 16.0f));
            Console.WriteLine(e.ToolTipSize);
        }

        void ToolTip_Draw(object sender, DrawToolTipEventArgs e)
        {
            using (e.Graphics)
            {
                Font f = new Font("Arial", 16.0f);
                e.DrawBackground();
                e.DrawBorder();
                this.commandBarButton1.ToolTipText = e.ToolTipText;
                e.Graphics.DrawString(e.ToolTipText, f, Brushes.Black, new Point(2, 2));

            }
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.