Setting widget properties and events

You use the Properties and Events tabs when working at the Design surface of the Rich UI editor.

To begin setting widget properties and events, do as follows:
  1. Click the Design tab or (when the Design tab is active) the Outline view.
  2. Right-click a widget and select Properties. The Properties view is displayed and gives you access to both the Properties and Events tabs.

Setting properties

At the Properties tab, you can add a value to a widget property, and the editor updates when you press Tab or Enter.

To remove a property value from a text box, select the value and press the Delete key. To remove a property value from a list box, select the (none).

To handle color selection, do as follows:
  1. Click the color or background Color property, if available. The Color selection dialog is displayed
  2. Three alternatives are available:
    • To work in the traditional Color dialog, click the Number format radio button and the subordinate Color button. On returning to the Color selection dialog, you can also specify whether the numeric color values retained from the Color dialog should be saved in RGB or hexadecimal format.
    • To select from a list of named colors instead, click the Name Format radio button and select a color.
    • To specify a value of your own, click the Custom radio button option. You can specify either an RGB format such as RGB(236,,233,216) or a hexadecimal format such as #ece9d8.

Creating new functions and enabling events

At the Events tab, you can identify the Rich UI handler function that will run in response to an event; or you can quickly create a new function.

In the row that lists the event of interest, do one of the following tasks:
  • Double-click the second column (named Function) and click the name of an existing handler function.
  • To create a new function instead, double-click the icon in the third column to display the New event handler dialog box. At the dialog box, specify the new function name and click OK. By default, the function name (for example, myButton_onClick) is the widget name followed by an underscore and the event name.