#41 RichEdit_Change doesn't work with onMouseDown


I read the solution for the RichEdit to generate Change
events at http://sourceforge.net/mailarchive/message.
php?msg_id=246228 (why doesn't that happen by
default, as documented?) but it ceases to work if I define
an onMouseDown or onMouseRightDown handler.

I do have some vague memory of this Change combined
with the on* issue being discussed on the mailing list but
Sourceforge's lame search capabilities did not turn out
anyhting useful, so I'm submitting a bug.

Hope that helps,
Dan Dascalescu


  • Dan Dascalescu

    Dan Dascalescu - 2005-07-22

    Code to reproduce the bug; note that onMouseRightDown simply needs to be there and doesn't need to be called for _Change not to work

  • Robert May

    Robert May - 2005-07-22
    • priority: 5 --> 1
  • Robert May

    Robert May - 2005-07-22

    Logged In: YES

    using any -onEVENT option turns on the NEM (New event model)
    and turns off the OEM (Old event model). So specifying any
    -onEVENT handler stops ALL old style event handlers being
    called, and will call the handler you specify with the
    -onEVENT option, for that event only.

    If you really want both types of handler to be called, then
    use the -eventmodel => 'both' option.

    The fact that you need to set the event mask if down to
    microsoft (although I agree that it might be better if
    Win32::GUI did this for you). If you want something more
    readable than

    $richedit->SendMessage (0x445, 0, 1);

    then use


    where ENM_CHANGE has the value 1.


  • Robert May

    Robert May - 2005-08-04
    • priority: 1 --> 2
    • assigned_to: nobody --> robertemay
  • Robert May

    Robert May - 2005-10-04

    Logged In: YES

    I've added some documentation to RichEdit to indicate that
    the event mask may need to be set to get any events, and
    documented the SetEventMask method.

    In the fullness of time I will write up a tutorial page on
    the use of NEM vs. OEM, and the fact that using any NEM
    option disables OEM evnet handlers by default.

  • Robert May

    Robert May - 2005-10-04
    • priority: 2 --> 1
    • status: open --> open-wont-fix
  • Robert May

    Robert May - 2005-11-22
    • status: open-wont-fix --> closed-wont-fix

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks