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
220
Grid's tooltip font
posted

Hello,

I have a question about the built-in tooltip.

Normally, when I change the font of the grid, then the font of the built-in tooltip will be adjusted automatically, so both grid and tooltip have the same font.

But when I set

this.ultraGrid1.DisplayLayout.Override.CellDisplayStyle = CellDisplayStyle.FormattedText;

then the tooltip font will not be adjusted to the grid font. The tooltip always seems to have the default font, no matter what font has been set to the grid.

Could this be a bug? Or what can I do to achieve that both grid and tooltip have the same font when using CellDisplayStyle.FormattedText?

My NetAdvantage version is 9.1.20091.2056.

Thanks.

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    I'm really not sure why this happens. To test this out, I tried this:


            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                e.Layout.Appearance.FontData.Name = "Wingdings";
                e.Layout.Override.CellDisplayStyle = CellDisplayStyle.FormattedText;
            }

    When I do this, I do indeed see that the tooltips are not using the same font as the grid cells.If I take out the CellDisplayStyle, it works fine.

    I noticed that it also works fine if I set the FontData on the Override's CellAppearance instead of on the grid's Layout.

    My best guess is that since CellDisplayStyle is skipping the appearance resolution of the editor, it's not walking all the way up to the grid for the tooltip. But since it works for the cell, I can't see any good reason why this should be the case.

    That's not to say there isn't a good reason, but it bears further investigation. I'm going to forward this over to Infragistics Developer Support so they can check it out.

    Out of curiosity, why exactly are you using CellDisplayStyle?

Children