Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

GUIKit Example:
ActionApp

Code

In[1]:=
In[2]:=

Definition

In[4]:=
Out[4]=

Example

This example illustrates how to take advantage of Widget["Action"] objects and easily connect and construct typical user interface elements, such as menu items, toolbars, contextual popup menus and buttons.

This example also highlights the following:

Using icon resources relative to the widget definition

Constructing menu item widgets

Assigning a contextual pop-up menu (alternate mouse clicking) to another widget

Defining names, tooltips, accelerator keystrokes, and icons for an action reused by all other widgets and globally controlling application state though the action widgets

In[3]:=

Optional : Localization Example

Since the ActionApp example centralizes most definitions of the user interface with the action widgets, it is also relatively easy to add localized versions of the application for many languages and locales. The following variant of the ActionApp widget definition demonstrates one way in which to organize localized data for a widget definition.

NOTE: The localized strings for the sample languages are not accurate and are only implemented to illustrate how a localized version might appear. Some localizations may not display completely on your machine if certain language fonts and resources are not installed.

In this sample technique for localizing content, we add a KeyString["key"] function that uses Mathematica to load and find localized definitions in the filesystem relative to the widget definition. One benefit of the definition itself being a Mathematica expression is that we can write tools to identify what keys we are using to implement a localized resource.

Definition

In[5]:=
Out[5]=


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: