一般

此「常规」选项卡可用于定义表单控件的常规属性。这些属性会因控件类型的不同而有所不同,因此以下属性并不是对所有的控件均适用。

要访问此命令...

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

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


note

如果将当前表单文档导出为 HTML 格式,将会导出控件的默认值,而不是控件的当前值。默认值由属性的「默认值」(例如文本框) 、「默认状态」(例如复选框和选项字段) 或「默认选择」(如列表框) 决定,具体取决于控件的类型。


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.

note

「三态」属性只可对数据库表单定义,「不可」用于 HTML 表单。


位置X

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

位置Y

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

切换

指定「按钮开关」是否充当「切换按钮」。如果将「切换」设置为「是」,点击该按钮或在焦点位于该控件时按「空格」键,可以切换「已选中」或「未选中」控制状态。「已选中」状态的按钮显示为「已按下」。

列表条目

Please note the tips referring to the keyboard controls.

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

note

请注意,只有在「列表内容类型」下的「数据」选项卡中的「值列表」选项被选中时,此处输入的列表条目才被整合到表单内。


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

note

对于 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:

当使用「Tab」键切换焦点时,跳过当前控件。

可以使用「Tab」键选择该控件。


前置符号

Determines if the currency symbol is displayed before or after the number when using currency fields. The default setting is currency symbols are not prefixed.

区间

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

千位分隔符

With numerical and currency fields you can determine whether thousands separators are used.

只读

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.

可打印

Specifies whether you want the control field to appear in a document's printout.

可扩展

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 以前的旧版本在读取使用此属性的文档时将自动忽略此属性。

可见的大小

在「数值单位」中指定滚动条翻阅块的大小。「("最大滚动值" - "最小滚动值") /2」可得到大小为背景区域一半的翻阅块。

如果设置为「0」,翻阅块的宽度将等于其高度。

名称

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.

note

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


名称也用来把具有相同功能的不同控件进行组合,例如单选按钮。为此,可以为组合的所有成员赋予相同的名称: 名称相同的控件形成一个组合。通过使用「组合框」可以直观地显示已组合的控件。

图形

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.

多重选择

Allows you to select more than one item in a list box.

大变化

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

字体

For control fields which have visible text or titles, select the display font that you want to use. To open the Font dialog, click the ... button. The selected font is used in control fields names and to display data in table control fields.

字符掩码

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.

note

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


定位

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.

tip

特殊字符」对话框 (插入 - 特殊字符) 中显示了某些字符和它们对应的 ASCII 码。


对齐/图形对齐

The alignment options are left-aligned, right-aligned, and centered. These options are available for the following elements:

  1. 标签字段的标题,

  2. 文本字段的内容,

  3. 表格控件列中表格字段的内容,

  4. 用于按钮的图形或文本。

    note

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


导航

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 the table control.

小变化

指定用户点击滚动条上的「箭头」图标时要增加或减少的值。

小数位数

With numerical and currency fields you can determine the number of digits displayed to the right of the decimal point.

差值

You can preset the value intervals for numerical and currency spin buttons. Use the up and down arrows of the spin button to increase or decrease the value.

已启用

If a control field has the property "Enabled" (Yes), the form user can use the control field. Otherwise (No), it is disabled and greyed out.

帮助 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.

帮助文本

Provides the option of entering a help text that will be displayed as a tip on the control. The tip shows the text in user mode when the mouse is moved over the control.

对于「URL 类型」按钮,帮助文本会代替输入的「URL」地址作为扩展提示显示。

帮助文本

In each control field you can specify additional information or a descriptive text for the control field. This property helps the programmer to save additional information that can be used in the program code. This field can be used, for example, for variables or other evaluation parameters.

延迟

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.

下表描述了可以指定给按钮的操作:

操作

说明

不执行任何操作。

提交表单

将当前表单其他控件字段中输入的数据发送到「表单属性」中「URL」下面指定的地址。

导出到 PDF 文件时,将 URL 输入到表单的数据属性「URL」文本框中。

重置表单

将其他控件字段的设置重置为预定义的默认值设置 (默认状态,「默认选择项」「默认值」)。

打开文档 / 网页

打开在「URL」下指定的 URL。您可以使用「框架」来指定目标框架。

第一条记录

将当前表单移动到第一条记录。

上一条记录

将当前表单移动到上一条记录。

下一条记录

将当前表单移动到下一条记录。

最后一条记录

将当前表单移动到最后一条记录。

保存记录

如要必要,请保存当前记录。

撤消输入数据

撤消对当前记录的修改。

新建记录

将当前表单移动到插入行。

删除记录

删除当前记录。

刷新表单

重新加载最新保存的当前表单版本。


数值

In a hidden control, under Value, you can enter the data which is inherited by the hidden control. This data will be transferred when sending the form.

数值调节钮

Numerical fields, currency fields, date and time fields can be introduced as spin buttons in the form.

文本类型

可在控件字段中使用换行和格式化,例如文本框或标签。要手动输入换行,请按「回车」键。选择「带有格式的多行」以输入带格式的文本。

warning

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


note

对于表格控件中的文本列,此控件被命名为「多行输入」。


文本行结尾为

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

断词

跨多个行显示文本。允许在文本框中使用换行符,以便可以输入多行文本。要手动输入换行符,请按「回车」键。

方向

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

日期格式

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

note

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


时间格式

You can define the desired format for the time display.

最大值

For numerical and currency fields, you can determine the maximum value that the user can enter.

最大文本长度

For text and combo boxes, you can define the maximum number of characters that the user can enter. If this control field property is uncertain, the default setting will be zero.

如果这个控件字段与一个数据库相关联,并且要从该数据库的字段定义中套用文本长度,则「不可以」在这里规定文本长度。只有当控件字段的属性没有被定义 (「未定义」状态),才能从数据库中套用设置。

最大的滚动数值。

Specify the maximum value of a scrollbar control.

最小值

For numerical and currency fields you can determine a minimum value to prevent the user from entering a smaller value.

最小滚动值。

Specify the minimum value of a scrollbar control.

最短日期

Determines the earliest date that a user can enter.

最短时间

Determines the minimum time that a user can enter.

最长日期

Determines a date which can not be exceeded by another value introduced by the user.

最长时间

Determines a time which can not be exceeded by another value introduced by the user.

标签

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.

如果要创建一个新的控件字段,将默认使用在「名称」属性里预定义的说明来标注控件。该标签由控件字段名称和给控件编号的整数组成 (例如「CommandButton1」)。通过「标题」属性可以给控件指定其他说明,从而使标签能够反映控件的功能。修改这个条目,使控件的标签更简练清晰,让用户一目了然。

要创建多行标题,请用「箭头」按钮打开组合框。可以按「Shift++回车」输入换行符。

note

「标题」属性仅用于为界面中用户可以看见的表单元素加上标签。请注意,如果用宏进行操作,运行时始终通过「名称」属性来定位控件。


标签字段

Specifies the source for the label of the control. The text of the label field will be used instead of the name of a database field. For example, in the Filter Navigator, Search dialog, and as a column name in the table view.

要将标签的一个字符定义为快捷键,以便用户通过在键盘上按这个字符来访问对应的控件,请在标签中的该字符之前插入波浪号 (~) 字符。

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

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

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.

格式化

Specifies the format code for the control. Click the ... button to select the format code.

框架

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

下一个文档在最高级别窗口中创建,即该层次结构的最高框架。如果当前框架已处于最高级别窗口,那么在当前框架中创建文档。


note

「框架」属性与 HTML 表单有关,而与数据库表单「无关」。


检查格式

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.

比例

Resizes the image to fit the size of the control.

滚动条

Adds the scrollbar type that you specify to a text box.

点击获取焦点

如果将此选项设为「是」,在您点击该按钮时「按钮开关」将获得焦点。

符号颜色

指定控件上的符号 (例如,滚动条上的箭头) 的颜色。

筛选/排序

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.

背景颜色

A background color is available for most control fields. If you click on Background color, a list will open which enables you to select among various colors. The "Standard" option adopts the system setting. If the desired color is not listed, click the ... button to define a color in the Color dialog.

自动填充

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 whether the first column is displayed with row labels, in which the current record is marked by an arrow.

货币符号

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".

note

「轮换顺序」属性「不适用于」「隐藏控件」。如果需要,也可以为图像按钮和图像控件设置此属性,以便可以通过「Tab」键选择这些控件。


当创建一个表单时,插入到表单中的控件字段会被自动分配索引,每增加一个控件字段,索引会自动加「1」并分配给新增加的控件字段。如果修改一个控件字段的索引,其他控件字段的索引会自动更新。不能获得焦点的元素 (「Tabstop = No」) 也会被分配一个索引。但是在按「Tab」键时这些控件字段会被跳过。

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

输入掩码

By specifying the character code in pattern fields, you can determine what the user can enter in the pattern field.

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

字符

含义

L

文本常量。这个位置不能编辑。字符将在「字符掩码」的相应位置显示。

a

可以输入字符「a-z」与「A-Z」。大写字符不会被转换成小写字符。

A

可以输入字符「A-Z」。如果输入了小写字母,将被自动转换成大写字母。

c

可以输入字符「a-z」「A-Z」与「0-9」。大写字符不会被转换成小写字符。

C

可以输入字符「A-Z」与「0-9」。如果输入了小写字母,将被自动转换成大写字母。

N

仅可输入字符「0-9」。

x

输入所有可打印字符。

X

可以输入所有可打印的字符。如果输入了小写字母,将被自动转换成大写字母。


例如,为字符掩码 "__.__.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 if the action of a control such as a spin button repeats when you click the control and hold the mouse button down.

锁定

定义控件的锁定位置。

隐藏选取

Specifies whether a text selection on a control remains selected when 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.

高度

定义控件的高度。

默认值

Sets the default value for the control field. For example, the default value will be entered when a form is opened.

对于「重置」类型的按钮,「默认值」条目定义了用户激活重置按钮时控件的状态。

默认按钮

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.

note

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


当在 Web 页表单中查找掩码时,可能会用到此属性。输入掩码含有一个文本字段和一个「「提交」类型」的按钮。在文本字段中输入检索条目后,激活该按钮可以开始搜索。如果将该按钮定义为默认按钮,则在输入完检索条目后只需要按「回车」键就可以开始搜索。

默认文本

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

默认日期

设置默认日期。

默认时间

设置默认时间。

默认滚动值

Sets the default value for the scrollbar.

默认状态

Specifies whether an option or a check box is selected by default.

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

对于组合选项字段,与默认设置对应的组的状态由「默认状态」属性定义。

默认选择

Specifies the list box entry to mark as the default entry.

对于「重置」类型的按钮,「默认选择」条目定义了用户激活重置按钮时列表框的状态。

对于包含值列表的「列表框」,可以点击「...」按钮打开「默认选择」对话框。

在「默认选择」对话框中,选择您希望在打开包含该列表框的表单时标记为选中的条目。

鼠标滚轮滚动

设置该值是否在用户滚动鼠标滚轮时发生更改。「从不」: 该值不发生任何更改。「在获取焦点时」: (默认) 当控件具有焦点,同时滚轮指向控件并滚动时,该值发生更改。「始终」: 无论控件是否具有焦点,当滚轮指向控件并滚动时,该值都发生更改。

请支持我们!