21.08.2013 Views

OpenOffice.org BASIC Guide - OpenOffice.org wiki

OpenOffice.org BASIC Guide - OpenOffice.org wiki

OpenOffice.org BASIC Guide - OpenOffice.org wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Temporary (Boolean)<br />

the focus is temporarily lost<br />

Control Element-Specific Events<br />

Events<br />

In addition to the preceding events, which are supported by all control elements, there are also some control<br />

element-specific events that are only defined for certain control elements. The most important of these events are:<br />

When Item Changed<br />

the value of a control element changes<br />

Item Status Changed<br />

the status of a control element changes<br />

Text modified<br />

the text of a control element changes<br />

When initiating<br />

an action that can be performed when the control element is triggered (for example, a button is pressed)<br />

When you work with events, note that some events, such as the When initiating event, can be initiated each<br />

time you click the mouse on some control elements (for example, on radio buttons). No action is performed to<br />

check if the status of the control element has actually changed. To avoid such “blind events”, save the old control<br />

element value in a global variable, and then check to see if the value has changed when an event is executing.<br />

The When initiating event is also noteworthy for the following reasons:<br />

This event is initiated by either a key-press or a mouse button. Thus, it provides a consistent interface for<br />

users who navigate by mouse or by keyboard.<br />

When the Repeat property of a command button is set to True, this event is the one which is repeatedly<br />

sent, as long as the triggering action (key down or mouse-button down) remains in effect.<br />

The properties for the Item Status Changed event are:<br />

Selected (long)<br />

currently selected entry<br />

Highlighted (long)<br />

currently highlighted entry<br />

ItemId (long)<br />

ID of entry<br />

Dialog Control Elements<br />

<strong>OpenOffice</strong>.<strong>org</strong> Basic recognizes a range of control elements which can be divided into the following groups:<br />

Entry fields Buttons Selection<br />

lists<br />

Other<br />

Text fields Standard buttons List boxes Scrollbars (horizontal and vertical)<br />

Date fields Checkboxes Combo-boxes Fields of groups<br />

Time fields Radio Buttons Tree Control Progress bars<br />

Numerical fields Dividing lines (horizontal and vertical)<br />

Currency fields Graphics<br />

Fields adopting<br />

any format<br />

File selection fields<br />

Chapter 11 · Dialogs 161

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

Saved successfully!

Ooh no, something went wrong!