wxRichTextFormattingDialog and wxRichTextAttr

Julian Smart julian at anthemion.co.uk
Fri Mar 7 02:01:39 PST 2008


Hi Jurgen,

You should be able to check whether wxTextAttr::HasTextEffects() is true 
after having retrieved the style, and if so, check whether 
GetTextEffectsFlags() has wxTEXT_ATTR_EFFECT_CAPITALS or 
wxTEXT_ATTR_EFFECT_STRIKETHROUGH.

For example:

wxTextAttrEx attr;
if (ctrl->GetStyle(pos, attr) && attr.HasTextEffects() && 
(attr.GetTextEffectsFlags() & wxTEXT_ATTR_EFFECT_CAPITALS) && 
(attr.GetTextEffects() & wxTEXT_ATTR_EFFECT_CAPITALS))
{
    // We have capitals at this position.
}

If it doesn't work, maybe you could step into 
wxRichTextParagraphLayoutBox::DoGetStyle() and check the actual value of 
the attributes - also try using a fresh wxTextAttrEx each time you 
retrieve the style.

Best regards,

Julian

Jürgen wrote:
> hi there,
>
> currently using rtctrl and wxRichTextFormattingDialog to format my output.
> i need to grab the details of every single char and as stefan wrote i'm
> using wxRichTextAttr.
>
> i can nearly get every single information i wanted, except of
> "Strikethrough" and "Capitals".
> How can i get those information?
>
> Thanks for your help,
>
> kind regards juergen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
>
>
>   


-- 
Julian Smart, Anthemion Software Ltd.
28/5 Gillespie Crescent, Edinburgh, Midlothian, EH10 4HU
www.anthemion.co.uk | +44 (0)131 229 5306
Tools for writers: www.writerscafe.co.uk
wxWidgets RAD:     www.anthemion.co.uk/dialogblocks





More information about the wx-users mailing list