Page 1 of 1

TRVStyleTemplateComboBox is empty

Posted: Thu May 11, 2017 7:39 pm
by filo
Hi Sergey,
I'm trying to use TRVStyleTemplateComboBox but it is empty - no styles.

from help:
The components require Editor.UseStyleTemplates=True, otherwise their Items are empty.
The components work automatically: place them on a form, assign Editor property;no additional code is required
I have done both conditions, but combo box is still empty. There are only a TRVStyleTemplateComboBox and TScalerichview components on the form.
I also have tried to copy TScaleRichView and combobox from ActionTestUni demo to the new project, but I have got the same result - empty combo.

I think problem is somewhere in RichViewEdit.Style.StyleTemplates, but I have been stuck inside of RVStyleFunc.ListFill method.

What I'm doing wrong?

Thank you for your advice.

Re: TRVStyleTemplateComboBox is empty

Posted: Thu May 11, 2017 7:52 pm
by Sergey Tkachenko
This combobox displays styletemplates contained in RichViewEdit.Style.StyleTemplates.
Initially, TRVStyle.StyleTemplates are empty.

TrvActionNew, when executed, fills RichViewEdit.Style.StyleTemplates with TrvActionNew.StyleTemplates. By default, TrvActionNew.StyleTemplates contains the most frequently used styles.
And when loading RVF or RTF files, RichViewEdit.Style.StyleTemplates are filled from these files

Notice that ActionTest demos starts either from executing TrvActionNew, or from loading file using TrvActionOpen.

Re: TRVStyleTemplateComboBox is empty

Posted: Thu May 11, 2017 8:17 pm
by filo
Understand, it works now.
I thought that if editor is showed as empty, it is already in "new" state. My fault.

Thank you.