In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

TRichEdit.OnContextMenu

Xailer professional forum in English
Responder
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

TRichEdit.OnContextMenu

Mensaje por Oleg »

Hi!
I tried to override standard RichEdit context menu and found that in the
code
METHOD RichEdit1ContextMenu( oSender, nPosX, nPosY ) CLASS TForm1
::ShowPopupMenu(::oPopupMenu1, nPosX, nPosY)
RETURN 1
when this event are triggered with mouse right button, nPosX and nPosY are
always equal to NIL.
If I use RichEdit1RButtonDown instead, nPosX and nPosY are OK (equal to
mouse position).
Please test it.
Thank you. Oleg.
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

TRichEdit.OnContextMenu

Mensaje por jfgimenez »

Oleg,
> I tried to override standard RichEdit context menu and found that in the
> code
>
> METHOD RichEdit1ContextMenu( oSender, nPosX, nPosY ) CLASS TForm1
> ::ShowPopupMenu(::oPopupMenu1, nPosX, nPosY)
> RETURN 1
>
> when this event are triggered with mouse right button, nPosX and nPosY are
> always equal to NIL.
>
> If I use RichEdit1RButtonDown instead, nPosX and nPosY are OK (equal to
> mouse position).
> Please test it.
Fixed. Thanks for the info.
The problem is that RE was using a different approach to show a contextmenu.
That is, it was expecting to the event to return a menu popup handle, not
that the event shows the menu itself. Now it's fixed to act exactly as the
documented TControl behavior.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

TRichEdit.OnContextMenu

Mensaje por jfgimenez »

Oleg,
> I tried to override standard RichEdit context menu and found that in the
> code
>
> METHOD RichEdit1ContextMenu( oSender, nPosX, nPosY ) CLASS TForm1
> ::ShowPopupMenu(::oPopupMenu1, nPosX, nPosY)
> RETURN 1
>
> when this event are triggered with mouse right button, nPosX and nPosY are
> always equal to NIL.
>
> If I use RichEdit1RButtonDown instead, nPosX and nPosY are OK (equal to
> mouse position).
> Please test it.
Fixed. Thanks for the info.
The problem is that RE was using a different approach to show a contextmenu.
That is, it was expecting to the event to return a menu popup handle, not
that the event shows the menu itself. Now it's fixed to act exactly as the
documented TControl behavior.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

TRichEdit.OnContextMenu

Mensaje por jfgimenez »

Oleg,
> Thanks for your support. When will you release the version with all these
> fixes?
I'm trying to fix another richedit bug; well, in fact, there is a windows
bug that I'm trying to workaround. I'll send it to you when fixed.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

TRichEdit.OnContextMenu

Mensaje por jfgimenez »

Oleg,
> Thanks for your support. When will you release the version with all these
> fixes?
I'm trying to fix another richedit bug; well, in fact, there is a windows
bug that I'm trying to workaround. I'll send it to you when fixed.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

TRichEdit.OnContextMenu

Mensaje por Oleg »

Jose,
> Fixed. Thanks for the info.
Thanks for your support. When will you release the version with all these
fixes?
Regards, Oleg.
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

TRichEdit.OnContextMenu

Mensaje por Oleg »

Jose,
> Fixed. Thanks for the info.
Thanks for your support. When will you release the version with all these
fixes?
Regards, Oleg.
Responder