24.05.2014 Views

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.3.1.3 Combo Box<br />

As its name indicates, Combo Box combines the capabilities of a single line text<br />

widget and a list widget that allows users to type in information and also provides<br />

a list of choices to complete the text entry field. The list can either be displayed at<br />

all times or dropped down by the user. That is why Combo Box is sometimes<br />

referred to as drop-down list. An example of a Combo Box is shown on the top right<br />

of Figure 47 with the label Leinad.rev.<br />

When the list portion of the Combo Box is hidden, users are given a visual cue, a<br />

downward-pointing arrow next to the text field. These drop down Combo Boxes<br />

are useful when presentation space is limited or when users will complete the text<br />

entry field more often by typing text than by choosing the entry field text from the<br />

list. The drop down Combo Box list should pop-up in the visible area of the screen<br />

but stay aligned with the text field (that is, at the bottom-edge of the screen, the<br />

list will be up).<br />

The application programmer provides an array of strings that will fill the list. Each<br />

string becomes an item in the list, with the first string becoming the item in<br />

position one, the second string becoming the item in position two, and so on. The<br />

list can actually be manipulated with the regular API of the XmList widget.<br />

Similarly, the text entry may be accessed by using XmTextField API. The size of<br />

the list is set by specifying the number of items that are visible in the list<br />

(XmNvisibleItemCount). If the number of items in the list exceeds the number of<br />

items that are visible, a vertical scroll bar will appear that allows the user to scroll<br />

easily through a large number of items.<br />

A Combo Box allows a single item to be selected in two ways: by scrolling<br />

through the List and selecting the desired item, or by entering text into the text<br />

entry field. Selecting an item from the list causes that item to be displayed in the<br />

text portion of the Combo Box. The single-line text field in a Combo Box can be<br />

either editable or non-editable. If the text field is editable, the user can type<br />

directly into it to enter a new list item. If the application needs to validate the<br />

entered text, it can do so by installing a XmNmodifyVerifyCallbacks on the text<br />

field. If the text field is non-editable, typing text invokes a matching algorithm that<br />

attempts to match the entered text with items in the list.<br />

8.3.1.4 Spin Box<br />

Although more modest, the Spin Box widget offers a quick way of selecting,<br />

cycling, or setting a value within a range. It can be used by a very large range of<br />

applications. The Spin Box function can be implemented using the existing Motif<br />

Arrow Button widget and a label widget. However, the Spin Box widget makes it<br />

much easier for the developer and uses much less memory.<br />

8.3.2 Motif Changes in Behavior<br />

The following changes have been made to the behavior of Motif 2.1:<br />

• Take focus without activating on Ctrl+Btn1 in List and Button widgets.<br />

• Supports an indeterminate state and associated visual in the existing toggle<br />

button and toggle button gadget. The indeterminate state is useful in<br />

application property sheets.<br />

Graphical Environment Enhancements 217

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!