Hello Boki,
can you explain to me how to use tnxhint in conjunction with tnxstylessheet?
I want to change the font size in the Cell.Hint.
Thanks in advance
Karl-Heinz
Posted 31 January 2021 - 03:41 PM
Hello Boki,
can you explain to me how to use tnxhint in conjunction with tnxstylessheet?
I want to change the font size in the Cell.Hint.
Thanks in advance
Karl-Heinz
Posted 31 January 2021 - 08:21 PM
Hi,
Please try something like this. It seems that there is a bug that happens in this scenario so I will fix it, but maybe this can be good starting point for your need.
object Form2: TForm2 Left = 0 Top = 0 Caption = 'Form2' ClientHeight = 242 ClientWidth = 472 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object Button1: TButton Left = 208 Top = 88 Width = 75 Height = 25 Hint = '<div class="bigtext">This is an example. <b>Big</b> text</div>' Caption = 'Button1' ParentShowHint = False ShowHint = True TabOrder = 0 end object NxHint61: TNxHint6 StylesSheet = NxStylesSheet61 Left = 216 Top = 136 end object NxStylesSheet61: TNxStylesSheet6 Rules = < item FontSize = '14' Name = 'bigtext' Selector = skClass end> Left = 320 Top = 128 end end
Posted 01 February 2021 - 01:14 PM
I think that I have fixed the issue. Here is the fix, but it will be included in the next update:
procedure TNxHintWindow6.ActivateHint(Rect: TRect; const AHint: string); begin with Rect do begin Canvas.Font.Assign(Self.Font); // <====== new line
Posted 01 February 2021 - 08:58 PM
Thank you, it works perfectly
0 members, 0 guests, 0 anonymous users