DbRichViewEdit - Font size is equal to 0
-
- Posts: 2
- Joined: Tue May 26, 2020 12:35 am
DbRichViewEdit - Font size is equal to 0
Good night Sergey Tkachenko. I have been a Richview user for over 10 years. It had an old version of Delphi. I upgraded this week to Delphi Rio. All my screens using DbRichViewEdit started having a problem, I use RichViewActions together. The problem is that every time I change the font size and save it sends the TRVFontSizeCombobox to 0 (zero), causing the font size to be minuscule, not changing to the desired font size. I am using version 18.2.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: DbRichViewEdit - Font size is equal to 0
Check your code where you call TrvActionFontEx.Execute.
Instead of using Action.Font.Size, use Action.FontSizeDouble (font size in half points).
In very old versions, there was no Action.FontSizeDouble, and Action.Font.Size was used.
In newer versions (including 18.2), Action.FontSizeDouble must be used instead of Action.Font.Size
And in the newest version (starting from 18.3), you can use any of them (assigning Action.FontSizeDouble changes Action.Font.Size and vice versa).
If this code is used in TRVFontSizeComboBox, consider to delete it. In the new version of RichViewActions, TRVFontComboBox and TRVFontSizeComboBox can work automatically, just assign their ActionFont and Editor properties.
Instead of using Action.Font.Size, use Action.FontSizeDouble (font size in half points).
In very old versions, there was no Action.FontSizeDouble, and Action.Font.Size was used.
In newer versions (including 18.2), Action.FontSizeDouble must be used instead of Action.Font.Size
And in the newest version (starting from 18.3), you can use any of them (assigning Action.FontSizeDouble changes Action.Font.Size and vice versa).
If this code is used in TRVFontSizeComboBox, consider to delete it. In the new version of RichViewActions, TRVFontComboBox and TRVFontSizeComboBox can work automatically, just assign their ActionFont and Editor properties.
-
- Posts: 2
- Joined: Tue May 26, 2020 12:35 am
Re: DbRichViewEdit - Font size is equal to 0
Thank you very much Sergey, it worked perfectly.