wx.richtext.richText

6 views
Skip to first unread message

Nathan smith

unread,
Feb 11, 2021, 3:01:34 PM2/11/21
to wxpytho...@googlegroups.com
Hi again,


Just a quick question.

Could anyone give a brief explanation of GetStyleForRange with wx.richtext?

I looked at it here:

https://wxpython.org/Phoenix/docs/html/wx.richtext.RichTextCtrl.html#wx.richtext.RichTextCtrl.GetUncombinedStyle

But it doesn't mention exactly what the arguments  should be?

Through experimentation it takes two arguments, and I'm assuming one of
them would be wx.richtext.RichTextRange but I've been unable to figure
out the rest.


Thanks

Nathan

Tim Roberts

unread,
Feb 11, 2021, 8:29:33 PM2/11/21
to wxpytho...@googlegroups.com
Nathan smith wrote:
>
> Just a quick question.
>
> Could anyone give a brief explanation of GetStyleForRange with
> wx.richtext?
> ...
> But it doesn't mention exactly what the arguments  should be?

Remember that wxPython is mostly just a wrapper around the C++ wxWidgets
library.  If you look up the wxWidgets documentation, you'll see it
takes two parameters, one of which is an output: a wxRichTextRange that
identifies the range to affect, and it should return a wxRichTextAttr.

https://docs.wxwidgets.org/3.0/classwx_rich_text_paragraph_layout_box.html

--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.


Reply all
Reply to author
Forward
0 new messages