realbasic-nug
[Top] [All Lists]

Re: Best way to handle contextual menus

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Best way to handle contextual menus
From: Charles Yeomans <charles@declareSub.com>
Date: Thu, 31 Jul 2008 20:40:10 -0400
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <1350.207.5.249.46.1217549819.squirrel@mail.mcio.org>
References: <1350.207.5.249.46.1217549819.squirrel@mail.mcio.org>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On Jul 31, 2008, at 8:16 PM, Brian wrote:

I posted this question yesterday, but I never saw it come to the list, so
I am "re-asking"...

I have a number of edit fields in my application, all of which I would
like the user to be able to right click on and see the basic edit menu
options.

I understand how to do this, but as it stands right now I need to write a
snippet of code on every edit fields MouseClick event to handle this.

I'm curious if there is a "better" way to handle this as a default
behavior in my app.  I don't know much about custom controls, but it
sounded like that may be an option??

Or perhaps there is already a solution to this, as it seems like possibly
a fairly standard request?


I think that the standard way would be to define a subclass of EditField in which you implement the ConstructContextualMenu and ContextualMenuAction event handlers. This subclass would then appear in Window editors -- choose "Project Controls" from that little PopupMenu above the control list -- and you're there.

Charles Yeomans

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>