Article Preview
Buy Now
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):
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
andContextualMenuAction
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 theContextualMenuAction
you actually handle the execution of those menu commands.
...End of Excerpt. Please purchase the magazine to read the full article.