<html><head><title>inserting and editing buttons</title><meta name="filename" content="text/common/guide/formfields"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
table.Tabelle1{
}
span.Tabelle1A{
width:18cm;}
td.Tabelle1A1{
}
table.Tabelle2{
}
span.Tabelle2A{
width:18cm;}
td.Tabelle2A1{
}
table.Tabelle3{
}
span.Tabelle3A{
width:18cm;}
td.Tabelle3A1{
}
p.P1{
}
p.P2{
}
p.P3{
}
p.P4{
}
p.P5{
}
span.T1{
font-weight:bold;}
span.fr1{
}
span.fr2{
}
span.fr3{
}
</style></head><body>
<p class="P1"/>
<p class="Head1"><help:key-word value="button; example of" tag="kw68136_1" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="control; example of" tag="kw68136_2" xmlns:help="http://openoffice.org/2000/help"/><help:to-be-embedded Eid="formfields" xmlns:help="http://openoffice.org/2000/help"><help:link Id="68136">inserting and editing buttons</help:link></help:to-be-embedded></p>
<ol class="L1">
<li class="">
<p class="P2">Open the <span class="T1">Form Functions</span> floating toolbar.</p>
</li>
<li class="">
<p class="P2">Click the <span class="T1">Push Button</span> icon from the <span class="T1">Form Functions</span> floating bar. The pointer will change to a cross-hair symbol.</p>
</li>
<li class="">
<p class="P2">In the document, drag open a box representing the size and position of the command button you want to insert.</p>
<p class="P2">The new button is selected.</p>
</li>
<li class="">
<p class="P2">To select a button, click on the edge, there where the mouse pointer appears with a cross with four arrows, or hold the <help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="MAC">(Option)</help:case><help:default>(Alt)</help:default></help:switch> key pressed.</p>
</li>
</ol>
<p class="Paragraph">You can move and scale a selected button like a graphic. You can call up dialogs for editing properties via the context menu of the button.</p>
<ul class="L2">
<li class="">
<p class="P3">Select the <span class="T1">Control</span> command from the context menu of the selected button for accessing the <span class="T1">Properties: Button</span> dialog. You can also call this dialog by clicking the<span class="T1"> Control Properties</span> icon contained in the <span class="T1">Form Functions</span> floating bar.</p>
<p class="P4">You can change the text on the button in this dialog under <span class="T1">General -Title</span>.</p>
</li>
<li class="">
<p class="P4">Use the <span class="T1">Events</span> tab if you would like to run a macro when the button has been clicked. Click the suspensive points button at the right to access a selection dialog for macros.</p>
<p class="P5">The <span class="T1">Events</span> tab contains all possible events to which a control can react. Select a macro which has to run when the button is clicked and then confirm your selection by clicking the<span class="T1"> Assign</span> button. You can use custom macros for this function.</p>
</li>
<li class="">
<p class="P5">End the design mode using the icon in the <span class="T1">Form Functions</span> floating toolbar. If you now click on your button in the document (not on the edge), the assigned macro is executed.</p>
<p class="Paragraph">In addition to the properties of the selected controls, you also can control the properties of the form to which the control belongs. Click the <span class="T1">Form Function</span> floating bar on the <span class="T1">Form properties</span> icon.</p>
<p class="Paragraph">Among other things, the form defines the database and table the form controls link to.</p>
<p class="Paragraph">You can link events with macros in forms with the <span class="T1">Events</span> tab. Doing this lets you run a specific macro when a form is loaded, for example.</p>
<p class="Paragraph">The other icons in the <span class="T1">Form Functions</span> floating toolbar serve to define interactive documents. In OpenOffice.org Basic you can also define your own dialogs. For this purpose, there are other controls for dialogs available to you in the OpenOffice.org Basic IDE.</p>