Page 1 of 1

Connecting RVFontComboBox and RVFontSizeCombobox

Posted: Wed May 05, 2010 10:52 pm
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.

Posted: Thu May 06, 2010 9:37 am
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.

Posted: Thu May 06, 2010 2:05 pm
by dc3_dcfl
Thanks, the ActionTest demo worked as a great model.

Posted: Thu May 06, 2010 2:56 pm
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.