Difference between revisions of "NL/Documentation/BASIC Guide/Control Elements"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 68: Line 68:
 
;<tt>Model.FontDescriptor (struct)</tt>:structuur met details van het lettertype dat moet worden gebruikt (overeenkomend met <idl>com.sun.star.awt.FontDescriptor</idl>)
 
;<tt>Model.FontDescriptor (struct)</tt>:structuur met details van het lettertype dat moet worden gebruikt (overeenkomend met <idl>com.sun.star.awt.FontDescriptor</idl>)
 
;<tt>Model.Label (String)</tt>:label dat wordt weergegeven op het besturingselement
 
;<tt>Model.Label (String)</tt>:label dat wordt weergegeven op het besturingselement
;<tt>Model.Printable (Boolean)</tt>:besturingselement kan worden afgedrukt;<tt>Model.State (Short)</tt>:als deze eigenschap gelijk is aan 1 wordt de optie geactiveerd, anders wordt hij gedeactiveerd
+
;<tt>Model.Printable (Boolean)</tt>:besturingselement kan worden afgedrukt
 +
;<tt>Model.State (Short)</tt>:als deze eigenschap gelijk is aan 1 wordt de optie geactiveerd, anders wordt hij gedeactiveerd
 
;<tt>Model.TextColor (Long)</tt>:tekstkleur van het besturingselement
 
;<tt>Model.TextColor (Long)</tt>:tekstkleur van het besturingselement
 
;<tt>Model.HelpText (String)</tt>:Helptekst die wordt weergegeven als de muisaanwijzer boven het besturingselement staat
 
;<tt>Model.HelpText (String)</tt>:Helptekst die wordt weergegeven als de muisaanwijzer boven het besturingselement staat
Line 79: Line 80:
 
== Keuzevakken ==
 
== Keuzevakken ==
  
Checkboxes are used to record a Yes or No value and depending on the mode, they can adopt two or three states. In addition to the Yes and No states, a check box can have an in-between state if the corresponding Yes or No status has more than one meaning or is unclear.
+
Keuzevakken worden gebruikt om een waarde Ja of Nee op te nemen en, afhankelijk van de modus, kunnen zij twee of drie statussen aannemen. In aanvulling op de  statussen Ja en Nee, kan een keuzevak een tussen-in status hebben als de overeenkomende status Ja of Nee meer dan één bedoeling heeft of niet duidelijk is.
  
Checkboxes provide the following properties:
+
Keuzevakken verschaffen de volgende eigenschappen:
  
;<tt>State (Short)</tt>:state of the checkbox (0: no, 1: yes, 2: in-between state)
+
;<tt>State (Short)</tt>:status van het keuzevak (0: nee, 1: ja, 2: status tussenin)
;<tt>Label (String)</tt>:label for the control element
+
;<tt>Label (String)</tt>:label voor het besturingselement
;<tt>enableTriState (Boolean)</tt>:in addition to the activated and deactivated states, you can also use the in-between state
+
;<tt>enableTriState (Boolean)</tt>:in aanvulling op de geactiveerd en gedeactiveerd status, kunt u ook de status tussenin  gebruiken
  
The model object of a checkbox provides the following properties:
+
Het object model van een keuzevak verschaft de volgende eigenschappen:
  
;<tt>Model.FontDescriptor (struct)</tt>:structure with details of the font used (in accordance with <idl>com.sun.star.awt.FontDescriptor</idl> structure)
+
;<tt>Model.FontDescriptor (struct)</tt>:structuur met details van het lettertype dat moet worden gebruikt (overeenkomend met <idl>com.sun.star.awt.FontDescriptor</idl>)
;<tt>Model.Label (String)</tt>:label for the control element
+
;<tt>Model.Label (String)</tt>:label dat wordt weergegeven op het besturingselement
;<tt>Model.Printable (Boolean)</tt>:the control element can be printed
+
;<tt>Model.Printable (Boolean)</tt>:besturingselement kan worden afgedrukt
;<tt>Model.State (Short)</tt>:state of the checkbox (0: no, 1: yes, 2: in-between state)
+
;<tt>Model.State (Short)</tt>:status van het keuzevak (0: nee, 1: ja, 2: status tussenin)
;<tt>Model.Tabstop (Boolean)</tt>:the control element can be reached with the Tab key
+
;<tt>Model.Tabstop (Boolean)</tt>:het besturingselement kan wordne bereikt met de Tabtoets
;<tt>Model.TextColor (Long)</tt>:text color of control element
+
;<tt>Model.TextColor (Long)</tt>:tekstkleur van het besturingselement
;<tt>Model.HelpText (String)</tt>:help text that is displayed when you rest the mouse cursor over the control element
+
;<tt>Model.HelpText (String)</tt>:Helptekst die wordt weergegeven als de muisaanwijzer boven het besturingselement staat
;<tt>Model.HelpURL (String)</tt>:URL of online help for the corresponding control element
+
;<tt>Model.HelpURL (String)</tt>:URL van de online Help voor het overeenkomende besturingselement
  
== Text Fields ==
+
== Tekstvelden ==
  
 
Text fields allow users to type numbers and text. The <idl>com.sun.star.awt.UnoControlEdit.</idl> service forms the basis for text fields.
 
Text fields allow users to type numbers and text. The <idl>com.sun.star.awt.UnoControlEdit.</idl> service forms the basis for text fields.

Revision as of 15:48, 18 March 2013

Book.png


Apache OpenOffice BASIC herkent een bereik aan besturingselementen welke kunnen worden onderverdeeld in de volgende groepen:

Invoervelden Knoppen Keuzelijsten Anders
  • Tekstvelden
  • Datumvelden
  • Tijdvelden
  • Numerieke velden
  • Valutavelden
  • Velden die elke indeling aannemen
  • Standaard knoppen
  • Keuzevakken
  • Radioknoppen
  • Schuifbalken (horizontaal en verticaal)
  • Groepsvakken
  • Voortgangsbalken
  • Scheidingslijnen (horizontaal en verticaal)
  • Afbeeldingen
  • Velden voor bestandsselectie

Knoppen

Een knop voert een actie uit als u er op klikt.

Het eenvoudigste scenario voor de knop is om een gebeurtenis Actie uitvoeren te activeren als er op wordt gedrukt door een gebruiker. U kunt ook andere acties aan de knop koppelen om een dialoogvenster te sluiten met behulp van de eigenschap PushButtonType. Als u klikt op een knop die deze eigenschap heeft ingesteld op de waarde 0, wordt het dialoogvenster niet beïnvloed. Als u klikt op een knop die deze eigenschap heeft ingesteld op de waarde 1, wordt het dialoogvenster gesloten en de methode Execute van het dialoogvenster geeft de waarde 1 terug (dialoogvenster reeks is correct beëindigd). Als PushButtonType de waarde 2 heeft, wordt het dialoogvenster gesloten en de methode Execute van het dialoogvenster geeft de waarde 0 terug (dialoogvenster gesloten). In de editor voor dialoogvensters worden de waarden voor de eigenschappen symbolisch weergegeven als Standaard (0), OK (1), Annuleren (2) en Help (3).

Het volgende zijn alle eigenschappen die beschikbaar zijn via het model van de knop:

Model.BackgroundColor (long)
kleur van de achtergrond
Model.DefaultButton (Boolean)
De knop wordt gebruikt als standaardwaarde en reageert op de Entertoets indien hij niet de focus heeft
Model.FontDescriptor (struct)
structuur die de details van het lettertype dat moet worden gebruikt specificeert (overeenkomend met de structuur van com.sun.star.awt.FontDescriptor)
Model.Label (String)
label dat wordt weergegeven op de knop
Model.Printable (Boolean)
het besturingselement kan worden afgedrukt
Model.TextColor (Long)
tekstkleur van het besturingselement
Model.HelpText (String)
Helptekst die wordt weergegeven wanneer u de muisaanwijzer over het besturingselement beweegt
Model.HelpURL (String)
URL van de online Help voor het overeenkomende besturingselement
PushButtonType (short)
actie die is gekoppeld aan aan de knop (0: geen actie, 1: OK, 2: Annuleren, 3: Help)

Radioknoppen

Deze knoppen worden in het algemeen in groepen gebruikt en stellen u in staat één of meerdere opties te selecteren. Als u een optie selecteert, worden alle andere opties in de groep gedeactiveerd. Dit zorgt er ten alle tijde voor dat slechts één optie is ingesteld.

Een besturingselement radioknop verschaft twee eigenschappen:

State (Boolean)
activeert de knop
Label (String)
label dat wordt weergegeven naast de knop

U kunt ook de volgende eigenschappen gebruiken van het model van de radioknoppen:

Model.FontDescriptor (struct)
structuur met details van het lettertype dat moet worden gebruikt (overeenkomend met com.sun.star.awt.FontDescriptor)
Model.Label (String)
label dat wordt weergegeven op het besturingselement
Model.Printable (Boolean)
besturingselement kan worden afgedrukt
Model.State (Short)
als deze eigenschap gelijk is aan 1 wordt de optie geactiveerd, anders wordt hij gedeactiveerd
Model.TextColor (Long)
tekstkleur van het besturingselement
Model.HelpText (String)
Helptekst die wordt weergegeven als de muisaanwijzer boven het besturingselement staat
Model.HelpURL (String)
URL van de online Help voor het overeenkomende besturingselement

U moet ze één voor één in de reeks van activering opgeven zonder een gat er tussen (eigenschap Model.TabIndex, beschreven als Volgorde van activering in de dialoogvenster-editor) om verschillende radioknoppen in een groep te combineren. Als de reeks van activering wordt onderbroken door een ander besturingselement, dan start Apache OpenOffice automatisch met een nieuwe groep besturingselementen die kan worden geactiveerd, ongeacht de eerste groep besturingselementen.

Documentation note.png VBA : Anders dan in VBA kunt u geen radioknoppen invoegen in een groep besturingselementen in Apache OpenOffice BASIC. Het groeperen van besturingselementen in Apache OpenOffice BASIC wordt alleen gebruikt om een visuele scheiding te verzorgen door een kader rond de besturingselementen te tekenen.


Keuzevakken

Keuzevakken worden gebruikt om een waarde Ja of Nee op te nemen en, afhankelijk van de modus, kunnen zij twee of drie statussen aannemen. In aanvulling op de statussen Ja en Nee, kan een keuzevak een tussen-in status hebben als de overeenkomende status Ja of Nee meer dan één bedoeling heeft of niet duidelijk is.

Keuzevakken verschaffen de volgende eigenschappen:

State (Short)
status van het keuzevak (0: nee, 1: ja, 2: status tussenin)
Label (String)
label voor het besturingselement
enableTriState (Boolean)
in aanvulling op de geactiveerd en gedeactiveerd status, kunt u ook de status tussenin gebruiken

Het object model van een keuzevak verschaft de volgende eigenschappen:

Model.FontDescriptor (struct)
structuur met details van het lettertype dat moet worden gebruikt (overeenkomend met com.sun.star.awt.FontDescriptor)
Model.Label (String)
label dat wordt weergegeven op het besturingselement
Model.Printable (Boolean)
besturingselement kan worden afgedrukt
Model.State (Short)
status van het keuzevak (0: nee, 1: ja, 2: status tussenin)
Model.Tabstop (Boolean)
het besturingselement kan wordne bereikt met de Tabtoets
Model.TextColor (Long)
tekstkleur van het besturingselement
Model.HelpText (String)
Helptekst die wordt weergegeven als de muisaanwijzer boven het besturingselement staat
Model.HelpURL (String)
URL van de online Help voor het overeenkomende besturingselement

Tekstvelden

Text fields allow users to type numbers and text. The com.sun.star.awt.UnoControlEdit. service forms the basis for text fields.

A text field can contain one or more lines and can be edited or blocked for user entries. Text fields can also be used as special currency and numerical fields as well as screen fields for special tasks. As these control elements are based on the UnoControlEdit Uno service, their program-controlled handling is similar.

Text fields provide the following properties:

Text (String)
current text
SelectedText (String)
currently highlighted text
Selection (Struct)
read-only highlighting of details (structure in accordance with com.sun.star.awt.Selection, with the Min and Max properties to specify the start and end of the current highlighting)
MaxTextLen (short)
maximum number of characters that you can type in the field
Editable (Boolean)
True activates the option for entering text, False blocks the entry option (the property cannot be called up directly but only through IsEditable)
IsEditable (Boolean)
the content of the control element can be changed, read-only

The following properties are provided through the associated model object:

Model.Align (short)
orientation of text (0: left-aligned, 1: centered, 2: right-aligned)
Model.BackgroundColor (long)
color of the background of the control element
Model.Border (short)
type of border (0: no border, 1: 3D border, 2: simple border)
Model.EchoChar (String)
echo character for password fields
Model.FontDescriptor (struct)
structure with details of font used (in accordance with com.sun.star.awt.FontDescriptor structure)
Model.HardLineBreaks (Boolean)
automatic line breaks are permanently inserted in the control element text
Model.HScroll (Boolean)
the text has a horizontal scrollbar
Model.MaxTextLen (Short)
maximum length of text, where 0 corresponds to no length limit
Model.MultiLine (Boolean)
permits entry to spans several lines
Model.Printable (Boolean)
the control element can be printed
Model.ReadOnly (Boolean)
the content of the control element is read-only
Model.Tabstop (Boolean)
the control element can be reached with the Tab key
Model.Text (String)
text associate with the control element
Model.TextColor (Long)
text color of control element
Model.VScroll (Boolean)
the text has a vertical scrollbar
Model.HelpText (String)
help text that is displayed when the mouse cursor rests over the control element
Model.HelpURL (String)
URL of online help for the corresponding control element

List Boxes

List boxes (com.sun.star.awt.UnoControlListBox service) support the following properties:

ItemCount (Short)
number of elements, read-only
SelectedItem (String)
text of highlighted entry, read-only
SelectedItems (Array Of Strings)
data field with highlighted entries, read-only
SelectedItemPos (Short)
number of the entry highlighted at present, read-only
SelectedItemsPos (Array of Short)
data field with the number of highlighted entries (for lists which support multiple selection), read-only
MultipleMode (Boolean)
True activates the option for multiple selection of entries, False blocks multiple selections (the property cannot be called up directly but only through IsMultipleMode)
IsMultipleMode (Boolean)
permits multiple selection within lists, read-only

List boxes provide the following methods:

addItem (Item, Pos)
enters the string specified in the Item into the list at the Pos position
addItems (ItemArray, Pos)
enters the entries listed in the string's ItemArray data field into the list at the Pos position
removeItems (Pos, Count)
removes Count entries as of the Pos position
selectItem (Item, SelectMode)
activates or deactivates highlighting for the element specified in the string Item depending on the SelectMode Boolean variable
makeVisible (Pos)
scrolls through the list field so that the entry specified with Pos is visible

The model object of the list boxes provides the following properties:

Model.BackgroundColor (long)
background color of control element
Model.Border (short)
type of border (0: no border, 1: 3D border, 2: simple border)
Model.FontDescriptor (struct)
structure with details of font used (in accordance with com.sun.star.awt.FontDescriptor structure)
Model.LineCount (Short)
number of lines in control element
Model.MultiSelection (Boolean)
permits multiple selection of entries
Model.SelectedItems (Array of Strings)
list of highlighted entries
Model.StringItemList (Array of Strings)
list of all entries
Model.Printable (Boolean)
the control element can be printed
Model.ReadOnly (Boolean)
the content of the control element is read-only
Model.Tabstop (Boolean)
the control element can be reached with the Tab key
Model.TextColor (Long)
text color of control element
Model.HelpText (String)
automatically displayed help text which is displayed if the mouse cursor is above the control element
Model.HelpURL (String)
URL of online help for the corresponding control element
Documentation note.png VBA : The VBA option for issuing list entries with a numerical additional value (ItemData) does not exist in Apache OpenOffice Basic. If you want to administer a numerical value (for example a database ID) in addition to the natural language text, you must create an auxiliary data field that administers in parallel to the list box.


Content on this page is licensed under the Public Documentation License (PDL).
Personal tools