[python-win32] wxPython/Pythonwin interplay/Richtext Controls

Mark Hammond mhammond at skippinet.com.au
Wed Aug 4 00:21:19 CEST 2004


I'm afraid I don't know what a "RICH2" control is exactly, and why Pythonwin
doesn't know about it.  However, you should also keep in mind that the
win32gui module should allow you to send whatever Windows messages you like.
SendMessage in win32gui allows you to pass strings and buffers for these
params, meaning the struct or array modules can be used to pack the raw
data.  Not as "nice" as the pythonwin OO framework, but should still work.

Mark.

> -----Original Message-----
> From: python-win32-bounces at python.org
> [mailto:python-win32-bounces at python.org]On Behalf Of Hannes Grund
> Sent: Tuesday, 3 August 2004 7:23 PM
> To: python-win32 at python.org
> Subject: [python-win32] wxPython/Pythonwin interplay/Richtext Controls
>
>
> Dear all,
>
> The original problem I had was the need of an richtext control
> to be used within a wxWidgets/wxPython gui running on an
> MSWin platform.
> wxTextCtrl as provided by wxWidgets uses (internally) the richtext
> ctrl (as provided by MSW), however, it exposes not its rich text
> capabilities (simply due to the platform specific nature) within
> the wxPython framework, there is one option to set
> (wxTE_RICH, wxTE_RICH2),
> precisly the version
> of the underlying rich edit dll to use, the use of this option
> affects also the window class set by wxWidgets.
>
> The following works well,
>
> textctrl = wxTextCtrl(parent,-1,"",style=wxTE_RICH)
> pywnd = win32ui.CreateWindowFromHandle(textctrl.GetHandle())
>
> The resulting pywin object is of type PyCRichEditCtrl,
> consquently, any
> rich text specific features can be accessed.
>
> The problem is that want to use some features only available
> by using the
> wxTE_RICH2 option (in the code example above wxTE_RICH is used.)
> The above construction refuses to work then, the resulting
> pythonwin object
> is only a PyCWnd object, the rich text api is not accessible.
>
> My question is now, if there is any way to force the creation of an
> PyCRichEditCtrl instance from an given handle.
>
> Thanks in advance,
>
>   Hannes Grund
>
> --
> NEU: WLAN-Router f|r 0,- EUR* - auch f|r DSL-Wechsler!
> GMX DSL = superg|nstig & kabellos http://www.gmx.net/de/go/dsl
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32



More information about the Python-win32 mailing list