wx.RichTextCtrl

Hi,

For my application, using wx.RichTextCtrl, I would like to receive an event when
the user change from "Paragraph".

Is it possible with the latest version bundled with the latest wxPython distro ?
Is this a "feature" planned ?

If not, what would be the starting point to add myself this feature ? Have
someone do something like that which can help or provide direction ?

Maybe another way exists and I'm missing somethings. If so, sorry. In the
context of my application, I would like to "restrict" what the user can do
(write) to force to respect a "format".

Best Regards.
StepH.

StepH wrote:

Hi,

For my application, using wx.RichTextCtrl, I would like to receive an event when
the user change from "Paragraph".

Is it possible with the latest version bundled with the latest wxPython distro ?
Is this a "feature" planned ?

If not, what would be the starting point to add myself this feature ? Have
someone do something like that which can help or provide direction ?

Maybe another way exists and I'm missing somethings. If so, sorry. In the
context of my application, I would like to "restrict" what the user can do
(write) to force to respect a "format".

I'm not sure what you are asking for, can you explain more clearly?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn <robin <at> alldunn.com> writes:

StepH wrote:
> Hi,
>
> For my application, using wx.RichTextCtrl, I would like to receive an

event when

> the user change from "Paragraph".
>
> Is it possible with the latest version bundled with the latest wxPython

distro ?

> Is this a "feature" planned ?
>
> If not, what would be the starting point to add myself this feature ? Have
> someone do something like that which can help or provide direction ?
>
> Maybe another way exists and I'm missing somethings. If so, sorry. In the
> context of my application, I would like to "restrict" what the user can do
> (write) to force to respect a "format".

I'm not sure what you are asking for, can you explain more clearly?

Hi Robin,

Let's say that I'm add 2 paragraph to a wx.RichTextCtrl. I would like to be
able to catch an event when the user (using cursor or mouse), move from one
paragrph to another. For example, to update a label where I display the style
of the "current" paragraph.

Hope I'm more clear, and thanks for yout time.

StepH.

You can use EVT_UPDATE_UI to check the current cursor position and
then use that to update the style label. You do need to do a little
more figuring, but at least you can use that event to check every time
the cursor moves.

···

On Thu, Aug 7, 2008 at 9:35 AM, StepH <stephane.bronsart@teledisnet.be> wrote:

Robin Dunn <robin <at> alldunn.com> writes:

StepH wrote:
> Hi,
>
> For my application, using wx.RichTextCtrl, I would like to receive an

event when

> the user change from "Paragraph".
>
> Is it possible with the latest version bundled with the latest wxPython

distro ?

> Is this a "feature" planned ?
>
> If not, what would be the starting point to add myself this feature ? Have
> someone do something like that which can help or provide direction ?
>
> Maybe another way exists and I'm missing somethings. If so, sorry. In the
> context of my application, I would like to "restrict" what the user can do
> (write) to force to respect a "format".

I'm not sure what you are asking for, can you explain more clearly?

Hi Robin,

Let's say that I'm add 2 paragraph to a wx.RichTextCtrl. I would like to be
able to catch an event when the user (using cursor or mouse), move from one
paragrph to another. For example, to update a label where I display the style
of the "current" paragraph.

Hope I'm more clear, and thanks for yout time.

StepH.

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

StepH wrote:

Robin Dunn <robin <at> alldunn.com> writes:

StepH wrote:

Hi,

For my application, using wx.RichTextCtrl, I would like to receive an

event when

the user change from "Paragraph".

Is it possible with the latest version bundled with the latest wxPython

distro ?

Is this a "feature" planned ?

If not, what would be the starting point to add myself this feature ? Have
someone do something like that which can help or provide direction ?

Maybe another way exists and I'm missing somethings. If so, sorry. In the
context of my application, I would like to "restrict" what the user can do
(write) to force to respect a "format".

I'm not sure what you are asking for, can you explain more clearly?

Hi Robin,

Let's say that I'm add 2 paragraph to a wx.RichTextCtrl. I would like to be able to catch an event when the user (using cursor or mouse), move from one paragrph to another. For example, to update a label where I display the style of the "current" paragraph.

Hope I'm more clear, and thanks for yout time.

There isn't an event like that, but you can probably do the same kind of
thing without too much trouble given what is available. I'd start with
a EVT_UPDATE_UI event handler, get the current position and if it's
changed since the last time you checked get the style at that position,
and if that has changed then update your labels.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!