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
Rolling my own Styles combobox/list
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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
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