表單控制項

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 文件格式的表單時,可使用該表單經由網際網路傳送資料。

評註圖示

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

控制項屬性

開啟用於編輯所選控制項之特性的對話方塊。

圖示

控制項

表單屬性

在此對話方塊中您可以指定整個表單的資料來源和事件。

圖示

表單

核取方塊

圖示

建立核取方塊。使用核取方塊可以啟動或關閉表單中的某項功能。

文字方塊

圖示

建立文字方塊。文字方塊是使用者可以輸入文字的欄位。在表單中,文字方塊顯示資料或者允許輸入新資料。

格式化的欄位

圖示

建立格式化的欄位。格式化的欄位是一個文字方塊,用於定義如何格式化輸入和輸出,並定義採用的限定值。

格式化的欄位具有特別的控制項屬性 (「格式」-「控制項」)。

按鈕

圖示

建立按鈕。此功能可用於執行已定義事件的指令,例如按一下滑鼠。

這些按鈕可以採用文字和圖形。

選項按鈕

圖示

建立選項按鈕。使用選項按鈕,使用者可以選擇數個選項之一。功能相同的選項按鈕具有相同的名稱 ([名稱] 屬性)。通常,它們稱為群組方塊。

清單方塊

圖示

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.

組合方塊

圖示

建立組合方塊。組合方塊是單行清單方塊,方塊中含有下拉式清單,使用者可以從其中選擇某個選項。可以將組合方塊指定為「唯讀」特性,這樣,使用者便無法輸入清單所含項目以外的其他項目。如果將表單連結到資料庫,而且資料庫連線處於使用中,則在文件中插入組合方塊後,螢幕上將自動顯示「組合方塊精靈」

貼標欄位

圖示

建立用於顯示文字的欄位。這些貼標僅顯示預先定義的文字,而無法在這些欄位中進行輸入。

更多控制項

開啟 [更多控制項] 工具列。

表單設計

開啟 [表單設計] 工具列。

啟動或關閉精靈

圖示

開啟與關閉自動表單控制項精靈。

這些精靈可協助您輸入清單方塊、表格控制項和其他控制項的屬性。

右鍵功能表中的指令