窗体控件

The Form Controls toolbar contains tools that you need to create an interactive form. You can use the toolbar to add controls to a form in a text, spreadsheet, presentation, or HTML document, for example a button that runs a macro.

要访问此命令...

选择视图 - 工具栏 - 窗体控件

插入工具栏上的图标(该工具栏图标最初不可见,您可能需要启用它才能看得到):

图标

窗体控件


批注图标

XML 窗体文档(XForms) 使用相同的控件集。


要创建窗体,请打开一个文档,然后使用“窗体控件”工具栏来添加和定义窗体控件。如果需要,您也能将窗体链接到数据库,以便能通过控件来操作数据库。

在 HTML 文档中创建窗体时,可以使用窗体通过 Internet 发送数据。

批注图标

LibreOfficeDev 只导出受您所要导出到的 HTML 版本所支持的窗体属性。请选择 - 加载/保存 - HTML 兼容性来指定用于导出的 HTML 版本。


在文档中添加控件

  1. On the Form Controls toolbar, click the icon of the control that you want to add.

  2. 在文档中,拖动鼠标,创建控件。

    To create a square control field, hold down the Shift key while you drag.

提示图标

To add a field from the field list of a table or query to a form, drag a cell into the form. In a text document, you can also drag a column header to add a field to a form. To include a label for the field, hold down the +Shift key down when you drag a column head.


修改控件

  1. 右键单击控件并选择控件图标。将显示一个对话框,可以在其中定义控件的属性。

  2. To specify a accelerator key for a control, add a tilde (~) in front of the character in the label for the control.

  3. 您能够将控件从一个文档拖放到另一个文档中。您也能在两个文档之间复制和粘贴控件。当您从一个文档中插入控件时,LibreOfficeDev 将分析控件的数据源、内容类型和内容属性,以便控件符合目标文档的逻辑结构。例如,显示地址簿内容的控件,在被复制到不同文档中后,仍能显示相同的内容。您能从窗体属性对话框的数据选项卡页面上查看这些属性。

选择

图标

此图标用于启动或关闭鼠标指针的选择模式。选择模式用于选择当前窗体中的控件。

设计模式

Toggles the Design mode on or off. This function is used to switch quickly between Design and User mode. Activate to edit the form controls, deactivate to use the form controls.

图标

Design Mode On/Off

控件属性

打开用于编辑选定控件属性的对话框。

图标

控件

表单属性

在此对话框中,可以为整个窗体指定数据源、事件以及其他属性。

图标

窗体

复选框

图标

创建一个复选框。使用复选框可以启动或关闭窗体中的某项功能。

文字框

图标

创建文字框。文字框是用户可以输入文字的字段。在窗体中,文字框用于显示数据或者用于输入新数据。

格式化的字段

图标

创建一个格式化的字段。格式化的字段是一个文字框,用于定义输入和输入的格式以及定义应用的限定值。

一个格式化的字段拥有特殊控件属性(选择格式 - 控件)。

Push 按钮

图标

创建一个 "Push" 类型的按钮。此功能可用于执行已定义的事件命令,例如鼠标单击。

这些按钮可以应用文字和图形。

选项按钮

图标

Creates an option button. Option buttons enable the user to choose one of several options. Option buttons with the same functionality are given the same name (Name property). Normally, they are given a group box.

列表框

图标

Creates a list box. A list box lets users select an entry from a list. If the form is linked to a database and the database connection is active, the List Box Wizard will automatically appear after the list box is inserted in the document. This wizard helps you create the list box.

组合框

图标

创建一个组合框。组合框是单行列表框,框中含有下拉列表,用户可从其中选择选项。可以为组合框指定"只读"属性,这样,用户就无法输入列表所含条目外的其他条目。如果将窗体绑定到数据库,而且数据库连接状态为有效,在文档中插入组合框后,会自动显示组合框向导

标签字段

图标

创建用于显示文本的字段。这些标签仅用于显示预定义文本。而无法在其中输入条目。

更多控件

打开更多控件工具栏。

窗体设计

打开窗体设计工具栏。

向导打开/关闭

图标

打开和关闭自动窗体控件向导。

这些向导可帮助您输入列表框、表格控件及其他控件的属性。

上下文菜单中的命令