[Gambas-user] TextArea Pop-up Menu on right click

Benoît Minisini gambas at ...1...
Sat Oct 4 15:10:03 CEST 2014


Le 03/10/2014 04:47, B Bruen a écrit :
>
> Hi Benoît,
>
> I'd just like to confirm your intentions here.
>
> As far as I know, under QT4, I have used that "non-existent menu"
> trick quite few times.
>
> I confirm (again under QT4) that a) setting the control popup-menu
> name to a non-existent menu kills the standard popup, unless b) I
> implement a MyControl_Menu method with STOP EVENT. In which case c)
> the standard menu appears. (even if the control has a popup menu name
> ???)
>
> To me there is three options: 1) status quo, if the menu does not
> exist, nothing happens 2) fix the STOP EVENT issue 3) make the
> "standard menu" visible in the IDE somehow.
>
> Of these, I'd obviously prefer 1.  But presumably this would mean
> fixing QTx?? (But I dont care about that) 2 would require a fair bit
> of work on my part. 3 I dont even want to think about.
>
> So, which way? (or is there other ways?)
>
> regards Bruce
>

Here is what I fixed in revision #6519:

Now when dealing with a Menu event, the default behaviour of a control
is cancelled if:

1) The PopupMenu property is set, even if it is set with a non-existing 
menu name.

2) Or if the 'Menu' event handler is stopped with STOP EVENT.

3) Or if a popup menu is manually displayed (with the Popup() methid) 
during the 'Menu' event handler.

I think that behaviour is coherent without breaking too much what badly 
existed before.

If there is any problem with that, tell me before I start releasing the 3.6

Regards,

-- 
Benoît Minisini




More information about the User mailing list