常规

Module
Contents
Index 🔎︎

# 一般

This General tab enables you to define the general properties of a form control. These properties differ, depending on the control type. Not all of the following properties are available for every control.

要访问此命令...

Open context menu of a selected form element - choose Control - General tab.

Open Form Controls toolbar or Form Design toolbar, click Control icon - General tab.

If you export the current form document to HTML format, the default control values are exported, not the current control values. Default values are determined - depending on the type of control - by the properties' Default value (for example, in text fields), Default status (for check boxes and option fields), and Default selection (for list boxes).

## Filtering/Sorting

Specifies to show or hide the filtering and sorting items in a selected Navigation bar control. Filtering and sorting items are the following: Sort ascending, Sort descending, Sort, Automatic filter, Default filter, Apply filter, Reset filter/sort.

## URL

Enter the URL address for a Open document or web page button type in the URL box. The address opens when you click the button.

如果在“用户”模式下将鼠标置于按钮上，假如没有输入其他“帮助”文字，则 URL 将显示为扩展提示。

## 三重状态

Specifies whether a check box can also represent ZERO values of a linked database apart from the TRUE and FALSE values. This function is only available if the database accepts three states: TRUE, FALSE and ZERO.

The "Tristate" property is only defined for database forms, not for HTML forms.

## 位置X

定义控件相对于锁定位置的 X 位置。

## 位置Y

定义控件相对于锁定位置的 Y 位置。

## 切换

Specifies if a Push button behaves as a Toggle Button. If you set Toggle to "Yes", you can switch between the "selected" and "not selected" control states when you click the button or press the Spacebar while the control has the focus. A button in the "selected" state appears "pressed in".

## 列表条目

Please note the tips referring to the keyboard controls.

预定义默认列表条目在默认选择组合框中输入。

请注意，只有在列表内容类型下的数据选项卡中的“值列表”选项被选中时，此处输入的列表条目才被整合到窗体内。

如果不希望将列表条目写入数据库或传送到 Web 表单的收件人，而是使用表单中不可见的指定值，可以为列表条目指定一个数值列表中的其他数值。该数值列表在 数值 选项卡上设置。在列表内容的类型中选择“数值列表”，然后在列表内容中输入数值。这些数值被指定到窗体中显示的相应列表条目。为了能正确指定，请按照数值列表中相应的顺序指定。

对于 HTML 文档，在常规选项卡中输入的列表条目对应于 HTML 标记 <OPTION>；在列表内容下的数据选项卡中输入的值列表条目对应于 <OPTION VALUE=...> 标记。

## 制表符

The "Tabstop" property determines if a control field can be selected with the Tab key. The following options are available:

否 | When using the Tab key, focusing skips the control.
是 | The control can be selected with the Tab key.

## 前置符号

指定在使用货币字段时，在数字之前或之后是否要显示货币符号。默认设置是不前置货币符号。

## 区间

确定每次单击数值调节钮时要增大和缩小的间隔。

## 千位分隔符

对于数字字段和货币字段，可以指定是否使用千位分隔符。

## 单击获取焦点

If you set this option to "Yes", the Push button receives the focus when you click the button.

## 只读

The "Read-only" property can be assigned to all controls in which the user can enter text. If you assign the read-only property to an image field which uses graphics from a database, the user will not be able to insert new graphics into the database.

## 可打印

指定是否在文档的打印输出中显示控制字段。

## 可扩展

A control field with the dropdown property has an additional arrow button which opens the list of the existing form entries per mouse click. Under Line count, you can specify how many lines (or rows) should be displayed in the dropdown state. Combination fields can have the dropdown property.

默认情况下，表格控件中按列插入的组合框始终可扩展。

## 可见

定义控件是否在活动模式下可见。在设计模式下，控件始终可见。

请注意，如果此属性设置为 "Yes"（默认值），这并不意味着该控件实际会显示在屏幕上。在计算某个控件的有效可见性时，还会应用其他约束。例如，位于 Writer 隐藏区域中的控件在该区域自身变为可见之前将始终不可见。

如果此属性设置为 "No"，则在活动模式下将始终隐藏该控件。

OpenOffice.org 3.1 以前的旧版本在读取使用此属性的文档时将自动忽略此属性。

## 可见的大小

Specifies the size of scrollbar thumb in "value units". A value of ("Scroll value max." minus "Scroll value min." ) / 2 would result in a thumb which occupies half of the background area.

If set to 0, then the thumb's width will equal its height.

## 名称

Each control field and each form has a "Name" property through which it can be identified. The name will appear in the Form Navigator and, using the name, the control field can be referred to from a macro. The default settings already specify a name which is constructed from using the field's label and number.

使用宏时要确保各个控制字段的名称是唯一的。

The name is also used to group different controls that belong together functionally, such as radio buttons. To do so, give the same name to all members of the group: controls with identical names form a group. Grouped controls can be represented visually by using a Group Box.

## 图形

An image button has a "Graphics" property. The "Graphics" property specifies the graphic's path and file name that you want to have displayed on the button. If you select the graphic file with the ... button, the path and file name will be automatically included in the text box.

## 图标大小

Specifies whether the icons in a selected Navigation bar should be small or large.

## 多重选择

用于在列表框中选择多个项目。

## 大变化

指定用户在滚动条两端按钮单击时，要增加或减少的值。

## 字体

对于含有可见文本或标题的控件字段，选择要使用的显示字体。要打开字体对话框，请单击 ... 按钮。选定的字体用于控件字段名，并用于显示表格控件字段中的数据。

## 字符掩码

With masked fields you can specify a literal mask. A literal mask contains the initial values of a form, and is always visible after downloading a form. Using a character code for the Edit mask, you can determine the entries that the user can type into the masked field.

字符掩码的长度要求始终与编辑掩码的长度一致。如果不一致，编辑掩码将被缩短或用空格来增加编辑掩码的长度。

## 定位

Specifies to show or hide the positioning items in a selected Navigation bar control. Positioning items are the following: Record label, Record position, Record count label, Record count.

## 宽度

Sets the column width in the table control field in the units that are specified in the LibreOffice module options. If you want, you can enter a value followed by a valid measurement unit, for example, 2 cm.

## 宽度

定义控件的宽度。

## 密码字符

If the user enters a password, you can determine the characters that will be displayed instead of the characters typed by the user. Under Password character, enter the ASCII code of the desired character. You can use the values from 0 to 255.

The characters and their ASCII codes can be seen in the Special Characters dialog (Insert - Special Character).

## 对齐/图形对齐

对齐选项包括左对齐、右对齐和居中对齐。这些选项可用于以下元素：

1. Title of Label fields,

2. Content of text fields,

3. Content of table fields in the columns of a table control,

4. Graphics or text that are used in buttons.

   按钮的对齐方式选项称为图形对齐方式。

## 导航

Specifies to show or hide the navigation items in a selected Navigation bar control. Navigation items are the following: First record, Previous record, Next record, Last record.

## 导航栏

Specifies whether to display the Navigation bar on the lower border of table controls.

## 小变化

Specify the value to add or subtract when the user clicks the Arrow icon on the scrollbar.

## 小数位数

对于数字字段和货币字段，可以指定小数点右侧显示的数字位数。

## 差值

可以预设数字和货币数值调节钮的数值间隔。使用数值调节钮的箭头按钮来增加或减少数值。

## 已启用

If a control field has the property "Enabled" (Yes), the form user will be able to use the control field. If the property is disabled, it will not be enabled (No) and will be displayed in a gray color.

## 帮助 URL

Specifies a batch label in URL spelling which refers to a help document and which can be called with the help of the control field. The help for the control field help can be opened if the focus is positioned on the control field and the user presses F1.

## 帮助文本

该选项用于输入帮助文本，这些文本将作为帮助提示显示在控件上。在用户模式中，当将鼠标指针移到该控件上时，就会显示帮助提示文本。

For URL type buttons, the help text appears as the extended tip instead of the URL address entered under URL.

## 帮助文本

对于每个控制字段，都可以指定附加信息或描述性文字。此属性用于帮助程序员保存可以在程序代码中使用的附加信息。例如，使用此字段来处理变量或其他求值参数。

## 延迟

Specifies the delay in milliseconds between repeating events. A repeating event occurs when you click an arrow button or the background of a scrollbar, or one of the record navigation buttons of a Navigation bar, and you keep the mouse button pressed for some time. You can enter a value followed by a valid time unit, for example, 2 s or 500 ms.

## 操作

You can use navigation actions to design your own database navigation buttons.

The following table describes the actions that you can assign to a button:

操作 | 说明
无 | 不执行任何操作。
提交窗体 | Sends the data that is entered in other control fields of the current form to the address that is specified in Form Properties under URL. 导出到 PDF 文件时，将 URL 输入到窗体的数据属性 "URL" 文本框中。
重设窗体 | Resets the settings in other control fields to the predefined defaults: Default Status, Default Selection, Default Value.
打开文档/网页 | 打开在 URL 下指定的 URL。您可以使用框架来指定目标框架。
第一条记录 | 将当前窗体移动到第一条记录。
上一条记录 | 将当前窗体移动到上一条记录。
下一条记录 | 将当前窗体移动到下一条记录。
最后一条记录 | 将当前窗体移动到最后一条记录。
保存记录 | 如要必要，请保存当前记录。
撤消输入数据 | 撤消对当前记录的修改。
新建记录 | 将当前窗体移动到插入行。
删除记录 | 删除当前记录。
刷新窗体 | 重新加载最新保存的当前窗体版本。

## 数值

在隐藏控件中的数值下，您可以输入隐藏控件继承的数据。发送窗体时，此数据将随之传送。

## 数值调节钮

数值字段、货币字段、日期和时间字段可作为调制按钮插入窗体。

## 文本类型

Allows you to use line breaks and formatting in a control field, such as a text box or label. To manually enter a line break, press the Enter key. Select "Multi-line with formatting" to enter formatted text.

如果选择“带有格式的多行”的文本类型，则无法将此控件绑定到数据库字段。

对于表格控件中的文本列，此控件被命名为“多行输入”。

## 文本行结尾为

对于文字字段，选择将文字写入数据库列时使用的行结尾代码。

## 断词

Displays text on more than one line. Allows you to use line breaks in a text box, so that you can enter more than one line of text. To manually enter a line break, press Enter.

## 方向

指定滚动条或数值调节钮的水平或垂直方向。

## 日期格式

With date fields you can determine the format for the date readout.

只要保留所有格式字段（日期、时间、货币、数字），则不管输入方式如何，它们将立即以选定格式自动套用格式。

## 时间格式

可以定义所需的时间显示格式。

## 最大值

对于数字字段和货币字段，可以指定用户能够输入的最大值。

## 最大文本长度

对于文字框和组合框，可以定义用户能够输入的最多字符数。如果不指定此控件字段属性，将显示默认设置值 "0"。

If the control is linked to a database and the text length is to be accepted from the field definition of the database, you must not enter the text length here. The settings are only accepted from the database if the control property was not defined ("Not Defined" state).

## 最大的滚动数值

指定滚动条控件的最大值。

## 最小值

对于数值字段和货币字段可以规定最小值，以防止用户输入小于它的值。

## 最小滚动值

指定滚动条控件的最小值。

## 最短日期

指定用户可以输入的最早日期。

## 最短时间

指定用户可以输入的最小时间值。

## 最长日期

指定一个日期，以限定用户输入的值不得超过此日期。

## 最长时间

指定一个时间，以限定用户输入的值不得超过此时间。

## 标签

The "Label" property sets the label of the control field that is displayed in the form. This property determines the visible label or the column header of the data field in table control forms.

When you create a new control, the description predefined in the "Name" property is used as the default for labeling the control. The label consists of the control field name and an integer numbering the control (for example, CommandButton1). With the "Title" property, you can assign another description to the control so that the label reflects the function of the control. Change this entry in order to assign an expressive label to the control that is visible to the user.

To create a multi-line title, open the combo box using the Arrow button. You can enter a line break by pressing Shift+CommandCtrl
+Enter.

The "Title" property is only used for labeling a form element in the interface visible to the user. If you work with macros, note that at runtime, a control is always addressed through the "Name" property.

## 标签字段

指定控件标签的源。将使用标签字段的文字，而非数据库字段的名称，例如在筛选器导航、查找对话框和表格视图（作为列名插入）中。

To define one character of the label as a mnemonic, so that the user can access this control by pressing the character on the keyboard, insert a tilde (~) character in front of the character in the label.

使用单选按钮时，只允许组合框架中的文本用作标签字段。此文本应用至同一组合中的所有单选按钮。

按文字字段旁的...按钮，您会看到一个对话框选择标签字段。从列表中选择一个标签。

Check the No assignment box to remove the link between a control and the assigned label field.

## 样式

Specifies whether Check boxes and Option buttons are displayed in a 3D look (default) or a flat look.

## 格式化

指定控件的格式代码。单击 ... 按钮可以选择格式代码。

## 框架

You can also specify the target frame to display a URL that you open when you click a button that has been assigned to the "Open document or web page" action.

如果单击该字段，可以从列表中选择某个选项，以指定下一个文档装入的框架。有以下几种可能：

条目 | 含义
_blank | 在一个新的空框架中创建下一个文档。
_parent | 下一个文档将在父框中创建。如果没有父框，则文档将在本身框中创建。
_self | 下一个文档在同一个框架内创建。
_top | 下一个文档在最高级别窗口中创建，即该层次结构的最高框架。如果当前框架已处于最高级别窗口，那么在当前框架中创建文档。

The "Frame" property is relevant for HTML forms, but not for database forms.

## 检查格式

You can have a format check with control fields that accept formatted contents (date, time, and so on). If the strict format function is activated (Yes), only the allowed characters are accepted. For example, in a date field, only numbers or date delimiters are accepted; all alphabet entries typed with your keyboard are ignored.

## 比例

调整图像至适合控件大小。

## 滚动条

将指定的滚动条类型添加到文本框中。

## 符号颜色

指定控件上的符号（例如，滚动条上的箭头）的颜色。

## 背景颜色

背景颜色可用于大多数控件字段。单击背景颜色时将打开一个列表，可在此列表中对多种颜色进行选择。“标准”选项将采用系统设置。如果未列出所需颜色，请单击 ... 按钮以便在颜色对话框中定义颜色。

## 自动填充

The AutoFill function displays a list of previous entries after you start to type an entry.

## 行数

For combo boxes with the "Dropdown" property, you can specify how many lines should be displayed in the dropdown list. With control fields which do not have the Dropdown option, the line's display will be specified by the size of the control field and the font size.

## 行高

In table controls, enter a value for the row height. If you want, you can enter a value followed by valid measurement unit, for example, 2 cm.

## 记录操作

Specifies to show or hide the action items in a selected Navigation bar control. Action items are the following: Save record, Undo, New record, Delete record, Refresh.

## 记录标记

指定是否在第一列中显示行标签，其中用箭头标记当前记录。

## 货币符号

In a currency field, you can predefine the currency symbol by entering the character or string in the "Currency symbol" property.

## 轮换顺序

The "Tab order" property determines the order in which the controls are focused in the form when you press the Tab key. In a form that contains more than one control, the focus moves to the next control when you press the Tab key. You can specify the order in which the focus changes with an index under "Tab order".

The "Tab order" property is not available to Hidden Controls. If you want, you can also set this property for image buttons and image controls, so that you can select these controls with the Tab key.

When creating a form, an index is automatically assigned to the control fields that are added to this form; every control field added is assigned an index increased by 1. If you change the index of a control, the indices of the other controls are updated automatically. Elements that cannot be focused ("Tabstop = No") are also assigned a value. However, these controls are skipped when using the Tab key.

您也可以在对话框轮换顺序中确定不同控件的索引。

## 输入掩码

通过指定掩码字段中的字符代码，确定用户在掩码字段中可以输入的内容。

编辑掩码的长度决定了可能的输入位置的数量。如果用户输入的字符与编辑掩码不符，则当退出该字段时将拒绝输入的内容。可以输入以下字符来定义编辑掩码：

字符 | 含义
L | A text constant. This position cannot be edited. The character is displayed at the corresponding position of the Literal Mask.
a | The characters a-z and A-Z can be entered. Capital characters are not converted to lowercase characters.
A | The characters A-Z can be entered. If a lowercase letter is entered, it is automatically converted to a capital letter.
c | The characters a-z, A-Z, and 0-9 can be entered. Capital characters are not converted to lowercase characters.
C | The characters A-Z and 0-9 can be entered. If a lowercase letter is entered, it is automatically converted to a capital letter.
N | Only the characters 0-9 can be entered.
x | 输入所有可打印字符。
X | All printable characters can be entered. If a lowercase letter is entered, it is automatically converted to a capital letter.

例如，为字符掩码 "__.__.2000" 定义编辑掩码 "NNLNNLLLLL"，以便让用户在输入日期时只输入 4 位数字。

## 边框

With control fields that have a frame, you can determine the border display on the form using the "Border" property. You can select among the "Without frame", "3-D look" or "Flat" options.

## 边框颜色

Specifies the border color for controls that have the "Border" property set to "flat".

## 重复

指定在单击控件（如数值调节钮）并按住鼠标键时，该控件的操作是否会重复。

## 锁定

定义控件的锁定位置。

## 隐藏选取

Specifies whether a text selection on a control remains selected when a the focus is no longer on a control. If you set Hide selection to "No", the selected text remains selected when the focus is no longer on the control that contains the text.

## 高度

定义控件的高度。

## 默认值

设置控件字段的默认值。例如，当打开窗体时，就会输入该默认值。

For a Reset type button, the Default value entry defines the status of the control if the reset button is activated by the user.

## 默认按钮

The "Default button" property specifies that the corresponding button will be operated when you press the Return key. If you open the dialog or form and do not carry out any further action, the button with this property is the default button.

应只为文档中的单个按钮指定此属性。

When using Web page forms, you might come across this property in search masks. These are edit masks that contain a text field and a Submit type button. The search term is entered in the text field and the search is started by activating the button. If the button is defined as the default button, however, simply hit Enter after entering the search term in order to start the search.

## 默认文本

设置文本框或组合框的默认文本。

## 默认日期

设置默认日期。

## 默认时间

设置默认时间。

## 默认滚动值

设置滚动条的默认值。

## 默认状态

指定是否在默认情况下选择某一选项或复选框。

对于重设类型的按钮，则可以定义用户激活重设按钮时控件的状态。

For grouped option fields, the status of the group corresponding to the default setting is defined by the "Default Status" property.

## 默认选择

指定列表框条目以标记为默认条目。

For a Reset type button, the Default selection entry defines the status of the list box if the reset button is activated by the user.

For a List box that contains a value list, you can click the ... button to open the Default selection dialog.

在默认选择对话框中，选择您希望在打开包含该列表框的窗体时标记为选中的条目。

## 鼠标滚轮滚动

Sets whether the value changes when the user scrolls a mouse wheel. Never: No change of the value. When focused: (default) The value changes when the control has the focus and the wheel is pointing at the control and gets scrolled. Always: The value changes when the wheel is pointing at the control and gets scrolled, no matter which control has the focus.