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

B Bruen bbruen at ...2308...
Fri Oct 3 04:47:39 CEST 2014


On Thu, 02 Oct 2014 16:27:44 +0200
Benoît Minisini <gambas at ...1...> wrote:

> Le 02/10/2014 15:36, Rolf-Werner Eilert a écrit :
> >
> >
> > Am 30.09.2014 15:29, schrieb Benoît Minisini:
> >> Le 30/09/2014 10:59, Rolf-Werner Eilert a écrit :
> >>> Hi,
> >>>
> >>> TextArea produces a pop-up menu when right-clicking on it. What can I do
> >>> to get rid of this behavious, i. e. when I do not want the user to be
> >>> able to manipulate the text via the pop-up menu?
> >>>
> >>> Thanks for your ideas!
> >>>
> >>> Rolf
> >>>
> >>
> >> Either set the "PopupMenu" property, or implement the "Menu" event handler.
> >>
> >> Regards,
> >>
> >
> > Hi Benoit, I tried both but to no avail. Even if I give an existing
> > menu, the standard menu (with Paste and Copy) will pop up. And it is
> > this menu I would like to avoid (because the students use it to fleece
> > the teacher) ;)
> >
> > Rolf
> >
> 
> Sorry, I told you what I wanted to achieve with the 'Menu' event 
> handler. But by looking at the code, I see that it does not behave 
> correctly, and it does not even behave the same between gb.qt4 and gb.gtk.
> 
> I will fix that for 3.6.
> 
> As for PopupMenu, it works for me provided that you don't implement the 
> Menu event handler!
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 

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 


-- 
B Bruen <adamnt42 at ...3379... (sort of)>




More information about the User mailing list