realbasic-nug
[Top] [All Lists]

Re: Menu Arrays Bug - Please Verify

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Menu Arrays Bug - Please Verify
From: Charles Yeomans <charles at declareSub dot com>
Date: Thu, 30 Nov 2006 19:48:02 -0500
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <456F04CC dot 2020402 at free dot fr> <p06110402c194c0523704 at [10 dot 0 dot 0 dot 3]> <219F838A-12DA-49E3-8417-10485F2F68C8 at cuci dot nl> <20061130224246 dot VIXN9669 dot aa03 dot charter dot net at CB56611-T dot chickensys dot com> <2608014A-07A6-41E9-98C5-1FF5AD807BB6 at declareSub dot com> <20061130234825 dot IEEX10028 dot aa02 dot charter dot net at CB56611-T dot chickensys dot com>

On Nov 30, 2006, at 6:33 PM, Rubber Chicken Software Co. wrote:

At 05:02 PM 11/30/2006, you wrote:

I'd suggest not using menu arrays.  Creating new MenuItem instances
works a lot better.

OK, makes sense - i don't mean to ask, but I don't quite get how that approach works, could you guide me through it?

I want to make a fairly complex tree; say four levels deep with nested submenus, some go all the way to the fourth level, some don't. This can be used as a MenuBar thing or as a ContextualMenu (opened by ConstructContextualMenu).

I assume you advise against building this in the IDE, you are suggesting coding it out?

Constructing a Menu Tree using new MenuItem instances seemed reasonable, but one thing I don't understand is how you link up code to the events.

Dim m As New MenuItem

base.Append m

OK, so, wonderful, so how do you set up an Event that has code?

Write a MenuItem subclass in which you implement the Action and EnableMenu event handlers.

Charles Yeomans

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


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