Connecting RVFontComboBox and RVFontSizeCombobox

General TRichView support forum. Please post your questions here
Post Reply
dc3_dcfl
Posts: 33
Joined: Sat Jan 30, 2010 12:45 am

Connecting RVFontComboBox and RVFontSizeCombobox

Post by dc3_dcfl »

I've checked all the demos that were included, but could not find how to use these two controls. The demos provided simply use the standard Delphi combobox.

I assume there must be a way to connect a DBRichViewEdit control to these, but I cannot seem to figure out how.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

See the ActionTest demo.
Briefly:
In RichViewEdit.OnCurTextStyleChanged, assign cmbFont.Text and cmbFontSize.FontName.
In cmbFont.OnClick, use rvActionFontEx to apply the chosen font name.
In cmbFontSize.OnClick, use rvActionFontEx to apply the chosen font size.
dc3_dcfl
Posts: 33
Joined: Sat Jan 30, 2010 12:45 am

Post by dc3_dcfl »

Thanks, the ActionTest demo worked as a great model.
dc3_dcfl
Posts: 33
Joined: Sat Jan 30, 2010 12:45 am

Post by dc3_dcfl »

Another follow up:

In my case, I am archiving several years worth of reports, so the state of the documents vary. Some come from conversion from word, some openoffice, some from PDF.

In many of the older docs, the font is undefined (specifically the ones originating from PDF). In those cases, no font and no font size are selected when I open the document or when changing the selection. I am going thru to add that manually to some of the docs.

I also noticed though that if the first thing in the document is a table then no font / font size is selected in their respective combobox. Even where I select all, change the font/font size and save, the next time I open the document, the comboboxes once again do not reflect the font/font size.
Post Reply