Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 18 in printed book and digital formats -- plus a one-year subscription (beginning with 19.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 6.5

COLUMN

The Invisible Interface

Using Contextual Menus

Issue: 6.5 (July/August 2008)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 17,025
Starting Page Number: 34
Article Number: 6511
Resource File(s):

Download Icon 6511.zip Updated: 2008-07-01 11:42:47

Related Link(s): None

Excerpt of article text...

On occasion, no interface is best. Such a hidden interface is implemented via contextual menus -- dynamic menus that are built when needed so they have only the items appropriate for the current situation and don't clutter the interface with options. Contextual menus are accessed via special mouse buttons or keystrokes (i.e., control-clicking on the Mac or right-clicking on systems with multiple-button mice).

Usually contextual menus are used as a secondary method of activating a feature, though in certain situations it might be appropriate to make them the only way to choose an action (such as for options only power users would need). But their main benefit is that they stay hidden until needed and thus can help you keep your interface minimal and clean but allow options when required.

So how do you go about supporting contextual menus in your applications? With recent versions of REALbasic it is not difficult. All windows and controls include standard ConstructContextualMenu and ContextualMenuAction events. In the first event you build your contextual menu. You should check the current situation of your program and add the appropriate menu items to the contextual menu. Within the ContextualMenuAction you actually handle the execution of those menu commands.

...End of Excerpt. Please purchase the magazine to read the full article.