21.08.2013 Views

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Working With Dialogs 212<br />

cmdNext = Dlg.getControl("cmdNext")<br />

cmdNext.Model.Enabled = False<br />

This example deactivates the cmdNtext button in the Dlg dialog with the aid of the model<br />

object from cmdNtext.<br />

Source: http:/ / <strong>wiki</strong>. services. openoffice. <strong>org</strong>/ w/ index. php? title=Documentation/ <strong>BASIC</strong>_<br />

<strong>Guide</strong>/ Working_ With_ Dialogs&oldid=105612<br />

Principal Authors: Fpe, Ccornell, TJFrazier<br />

Properties<br />

Name and Title<br />

Every control element has its own name that can be queried using the following model<br />

property:<br />

Model.Name (String)<br />

control element name<br />

You can specify the title that appears in the title bar of a dialog with the following model<br />

property:<br />

Model.Title (String)<br />

dialog title (only applies to dialogs)<br />

Position and Size<br />

You can query the size and position of a control element using the following properties of<br />

the model object:<br />

Model.Height (long)<br />

height of control element (in ma units)<br />

Model.Width (long)<br />

width of control element (in ma units)<br />

Model.PositionX (long)<br />

X-position of control element, measured from the left inner edge of the dialog (in ma<br />

units)<br />

Model.PositionY (long)<br />

Y-position of control element, measured from top inner edge of the dialog (in ma units)<br />

To ensure platform independence for the appearance of dialogs, <strong>OpenOffice</strong>.<strong>org</strong> uses the<br />

Map AppFont (ma) internal unit to specify the position and size within dialogs. An ma unit<br />

is defined as being one eighth of the average height of a character from the system font<br />

defined in the operating system and one quarter of its width. By using ma units,<br />

<strong>OpenOffice</strong>.<strong>org</strong> ensures that a dialog looks the same on different systems under different<br />

system settings.

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

Saved successfully!

Ooh no, something went wrong!