Currently Being Moderated

Creating Dialogs

VERSION 7

Created on: Oct 23, 2007 1:29 PM by Curl Education - Last Modified:  Jun 16, 2009 8:11 PM by Administrator

Dialogs can provide order to your graphical controls. A Dialog is a subclass of Frame, therefore it can only hold a single graphical child; but that child (e.g. Table, HBox, VBox) can hold many other objects. A Dialog helps manage its child controls by:

 

  • Controlling navigation between all child controls using the TAB key

  • Allowing a single event to be broadcast to all child controls

  • Allowing child controls to send events up to their parent Dialog

 

Tip: Dialog objects can also hold objects that are not GUI controls, such as text, images, and links.

 

Creating a Dialog

Use the Dialog class to create a dialog. From the definition, it only holds one graphical child. Therefore we must use a container, such as VBox to hold all the controls. In the example below, we are creating a simple Dialog that allows the user to enter values using three TextFields.

 

 

Dialog Navigation

A good interface design does not force the user to shift gears very often. A user at the keyboard tends to stay at the keyboard, a user controlling navigation using a mouse tends to keep using the mouse. Anytime users have to take their hands off the keyboard to grab the mouse (or vice versa), it slows them down.

 

One way a Dialog helps this by allowing you to define the navigation order for the controls inside the Dialog. This allows users to tab through each control, keeping their hands on the keyboard. Once the user types into the TextField, by default, they can automatically TAB to the next control. You can also set the tab-index property on each control to define the TAB order of controls.

 

In this example, we have reversed the tab order.

 

 

Tip: The tab-index begins with the value of 1. The tab-index value of 0 is traversed at the end of the chain.

 

Committing the Dialog

Commit is fired at all child controls when the Dialog.commit method is called. By convention, Dialog.commit should be called any time the information entered in the dialog is considered to be complete. For example, an OK button should call Dialog.commit when it is clicked. The event signals that it is time to commit any pending changes.

 

 

Standard dialogs provided by Curl, Inc. call the commit method when the user clicks the OK or Apply buttons.

 

For more information regarding dialogs, please refer to the following section in the Curl Documentation:<font color="#000080">Curl Developer's Guide &gt; Graphical User Interface &gt; Dialogs and Controls &gt; Using Dialogs</font>

Average User Rating
(0 ratings)




ramana reddy ramana reddy  says:

i am not able to view images on this page and also most of the pages.

ramana reddy ramana reddy  says:

how can i make a default selected item.

ramana reddy ramana reddy  says in response to ramana reddy:

i have installed the rte now i am able to see.

Tthanks Friedger for the help.

More Like This

  • Retrieving data ...

Incoming Links