Rolling my own Styles combobox/list

General TRichView support forum. Please post your questions here
Post Reply
aoven
Posts: 45
Joined: Wed Nov 09, 2005 7:28 pm

Rolling my own Styles combobox/list

Post by aoven »

What would be the best way of maintaining a list of all styles that are available in the current document at a given time?

Ideally, it should work exactly like the font combobox - updating ItemIndex on caret movements and applying selected style to text.

Aleksander
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

It makes sense to add only styles having Standard property = True.
All styles added as a result of editing operations have Standard=False, so editing operations do not change items of such list.

List of styles may be changed only when you load a new RVF document.

For changing ItemIndex, use RichViewEdit.OnCurTextStyleChanged. For applying, use ApplyTextStyle
Post Reply