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

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

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

Control Element Forms 236<br />

name of font type<br />

FontHeight (Single)<br />

height of character in points (pt)<br />

Tag (String)<br />

string containing additional information, which can be saved in the button for<br />

program-controlled access<br />

Label (String)<br />

inscription of button<br />

Printable (Boolean)<br />

the control element can be printed<br />

State (Short)<br />

if 1, the option is activated, otherwise it is deactivated<br />

RefValue (String)<br />

string for saving additional information (for example, for administering data record<br />

IDs)<br />

TextColor (Long)<br />

text color of control element<br />

HelpText (String)<br />

automatically displayed help text, which is displayed if the mouse cursor is above the<br />

control element<br />

HelpURL (String)<br />

URL of online help for the corresponding control element<br />

The mechanism for grouping option buttons distinguishes between the control elements for<br />

dialogs and forms. Whereas control elements appearing one after another in dialogs are<br />

automatically combined to form a group, grouping in forms is performed on the basis of<br />

names. To do this, all option buttons of a group must contain the same name.<br />

<strong>OpenOffice</strong>.<strong>org</strong> combines the grouped control elements into an array so that the individual<br />

buttons of a <strong>OpenOffice</strong>.<strong>org</strong> Basic program can be reached in the same way.<br />

The following example shows how the model of a control element group can be determined.<br />

Dim Doc As Object<br />

Dim Forms As Object<br />

Dim Form As Object<br />

Dim Ctl As Object<br />

Dim I as Integer<br />

Doc = StarDesktop.CurrentComponent<br />

Forms = Doc.Drawpage.Forms<br />

For I = 0 To Forms.Count - 1<br />

Form = Forms.GetbyIndex(I)<br />

If Form.HasByName("MyOptions") Then<br />

Ctl = Form. GetGroupbyName("MyOptions")

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

Saved successfully!

Ooh no, something went wrong!