Page 1 of 1
Selected Text in font combobox ScaleRichviewEditor
Posted: Mon Jun 02, 2025 3:02 pm
by tomr
Hello Richview-Support,
while working with your ScaleRichView component I come up with the following question:
If I load the richviewactiontest demo and start the project. Now the font combobox has selected text.

- ScaleRichview FontComboBox.png (21.1 KiB) Viewed 3841 times
If I open the richviewactiontest demo from the richviewedit and start the project, the font combobox is not selected.

- Richview FontComboBox.png (19.45 KiB) Viewed 3841 times
Is there a way that the fontcombobox has no intial selection?
Re: Selected Text in font combobox ScaleRichviewEditor
Posted: Tue Jun 03, 2025 3:41 pm
by Sergey Tkachenko
The demo uses a workaround,
Code: Select all
const
WM_DESELECTCOMBO = WM_USER + 1;
In the form's interface section:
Code: Select all
procedure WMDeselectCombo(var Msg: TMessage); message WM_DESELECTCOMBO;
procedure DeselectComboBoxes;
Implementation:
Code: Select all
procedure TForm3.DeselectComboBoxes;
begin
cmbFontSize.SelLength := 0;
cmbFont.SelLength:= 0;
end;
// The font combo box is displayed selected on start. Hiding its selection.
procedure TForm3.WMDeselectCombo(var Msg: TMessage);
begin
DeselectComboBoxes;
end;
PostMessage(Handle, WM_DESELECTCOMBO, 0, 0) is called on FormShow and FormBeforeMonitorDpiChanged.
DeselectComboBoxes is called in btnLanguageClick.
Re: Selected Text in font combobox ScaleRichviewEditor
Posted: Fri Jun 06, 2025 7:05 am
by tomr
Hello Sergey,
Thank you for the information. I will try it out and give you feedback afterwards.
Re: Selected Text in font combobox ScaleRichviewEditor
Posted: Fri Jun 06, 2025 11:46 am
by tomr
Hello again, Sergey,
With your solution, everything works fine. You can close the topic.
