OpenOffice.org BASIC Guide - OpenOffice.org wiki
OpenOffice.org BASIC Guide - OpenOffice.org wiki
OpenOffice.org BASIC Guide - OpenOffice.org wiki
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Properties<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 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 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 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 Map AppFont (ma)<br />
internal unit to specify the position and size within dialogs. An ma unit is defined as being one eighth of the<br />
average height of a character from the system font defined in the operating system and one quarter of its width.<br />
By using ma units, <strong>OpenOffice</strong>.<strong>org</strong> ensures that a dialog looks the same on different systems under different<br />
system settings.<br />
If you want to change the size or position of control elements for runtime, determine the total size of the dialog<br />
and adjust the values for the control elements to the corresponding part ratios.<br />
Note – The Map AppFont (ma) replaces the Twips unit to achieve better platform independence.<br />
Focus and Tabulator Sequence<br />
You can navigate through the control elements in any dialog by pressing the Tab key. The following properties are<br />
available in this context in the control elements model:<br />
Model.Enabled (Boolean)<br />
activates the control element<br />
Model.Tabstop (Boolean)<br />
allows the control element to be reached through the Tab key<br />
Model.TabIndex (Long)<br />
position of control element in the order of activation<br />
Finally, the control element provides a getFocus method that ensures that the underlying control element<br />
receives the focus:<br />
getFocus<br />
control element receives the focus (only for dialogs)<br />
154 <strong>OpenOffice</strong>.<strong>org</strong> 3.2 <strong>BASIC</strong> <strong>Guide</strong> · March 2010