Class OdfDatabaseFormDesigner
Represents the form designer for an ODB database, used to model form properties and common controls. 表示 ODB 資料庫的表單設計器,用於建模表單屬性與常用控制項。
報表內容(LibreOffice Base「使用嚮導建立報表」產生的型式)應改用 TextDocument
搭配 AddDatabaseDisplayField(string, string, string?)/
AddDatabaseNextField(string, string?) 建立為獨立文件,再透過
AddReport(string, string?) 的 href 參照機制連結至 .odb 套件。
不存在官方 OASIS ODF 報表結構 schema(先前版本的 DefineReportStructure 使用了虛構的
urn:oasis:names:tc:opendocument:xmlns:report:1.0 命名空間,已移除)。
public sealed class OdfDatabaseFormDesigner
- Inheritance
-
OdfDatabaseFormDesigner
- Inherited Members
Constructors
OdfDatabaseFormDesigner(OdfDocument)
Initializes a new instance of the OdfDatabaseFormDesigner class. 初始化 OdfDatabaseFormDesigner 類別的新執行個體。
public OdfDatabaseFormDesigner(OdfDocument document)
Parameters
documentOdfDocumentThe ODF sub-document on which to design the form. / 要進行表單設計的 ODF 子文件。
Exceptions
Methods
AddButton(string, string)
Short overload of AddButton that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddButton 多載。
public OdfNode AddButton(string name, string label)
Parameters
Returns
- OdfNode
AddButton(string, string, string?)
Short overload of AddButton that accepts name, label, and value; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 value;其餘可選參數使用預設值並轉呼叫最長 AddButton 多載。
public OdfNode AddButton(string name, string label, string? value)
Parameters
Returns
- OdfNode
AddButton(string, string, string?, OdfLength?)
Short overload of AddButton that accepts name, label, value, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value 與 x;其餘可選參數使用預設值並轉呼叫最長 AddButton 多載。
public OdfNode AddButton(string name, string label, string? value, OdfLength? x)
Parameters
Returns
- OdfNode
AddButton(string, string, string?, OdfLength?, OdfLength?)
Short overload of AddButton that accepts name, label, value, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddButton 多載。
public OdfNode AddButton(string name, string label, string? value, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddButton(string, string, string?, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddButton that accepts name, label, value, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddButton 多載。
public OdfNode AddButton(string name, string label, string? value, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddButton(string, string, string?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds a button control (form:button). 新增按鈕控制項(form:button)。
public OdfNode AddButton(string name, string label, string? value, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name. / 控制項名稱。
labelstringThe text displayed on the button. / 按鈕上顯示的文字。
valuestringThe button value or action command. / 按鈕的值或動作命令。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added button. / 代表新增的按鈕 OdfNode 節點。
AddCheckBox(string, string)
Short overload of AddCheckBox that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddCheckBox 多載。
public OdfNode AddCheckBox(string name, string label)
Parameters
Returns
- OdfNode
AddCheckBox(string, string, bool)
Short overload of AddCheckBox that accepts name, label, and isChecked; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 isChecked;其餘可選參數使用預設值並轉呼叫最長 AddCheckBox 多載。
public OdfNode AddCheckBox(string name, string label, bool isChecked)
Parameters
Returns
- OdfNode
AddCheckBox(string, string, bool, OdfLength?)
Short overload of AddCheckBox that accepts name, label, isChecked, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isChecked 與 x;其餘可選參數使用預設值並轉呼叫最長 AddCheckBox 多載。
public OdfNode AddCheckBox(string name, string label, bool isChecked, OdfLength? x)
Parameters
Returns
- OdfNode
AddCheckBox(string, string, bool, OdfLength?, OdfLength?)
Short overload of AddCheckBox that accepts name, label, isChecked, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isChecked、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddCheckBox 多載。
public OdfNode AddCheckBox(string name, string label, bool isChecked, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddCheckBox(string, string, bool, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddCheckBox that accepts name, label, isChecked, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isChecked、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddCheckBox 多載。
public OdfNode AddCheckBox(string name, string label, bool isChecked, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddCheckBox(string, string, bool, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds a checkbox control (form:checkbox). 新增核取方塊控制項(form:checkbox)。
public OdfNode AddCheckBox(string name, string label, bool isChecked, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name. / 控制項名稱。
labelstringThe displayed label text. / 顯示的標籤文字。
isCheckedboolThe default checked state. / 預設勾選狀態。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added checkbox. / 代表新增的核取方塊 OdfNode 節點。
AddComboBox(string, string)
Short overload of AddComboBox that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddComboBox 多載。
public OdfNode AddComboBox(string name, string label)
Parameters
Returns
- OdfNode
AddComboBox(string, string, IEnumerable<string>?)
Short overload of AddComboBox that accepts name, label, and items; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 items;其餘可選參數使用預設值並轉呼叫最長 AddComboBox 多載。
public OdfNode AddComboBox(string name, string label, IEnumerable<string>? items)
Parameters
namestringlabelstringitemsIEnumerable<string>
Returns
- OdfNode
AddComboBox(string, string, IEnumerable<string>?, OdfLength?)
Short overload of AddComboBox that accepts name, label, items, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items 與 x;其餘可選參數使用預設值並轉呼叫最長 AddComboBox 多載。
public OdfNode AddComboBox(string name, string label, IEnumerable<string>? items, OdfLength? x)
Parameters
namestringlabelstringitemsIEnumerable<string>xOdfLength?
Returns
- OdfNode
AddComboBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?)
Short overload of AddComboBox that accepts name, label, items, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddComboBox 多載。
public OdfNode AddComboBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddComboBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddComboBox that accepts name, label, items, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddComboBox 多載。
public OdfNode AddComboBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddComboBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds an editable combo box control (form:combobox). 新增可編輯下拉組合方塊控制項(form:combobox)。
public OdfNode AddComboBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name. / 控制項名稱。
labelstringThe label text. / 標籤文字。
itemsIEnumerable<string>The list of options for the combo box. / 下拉選單的選項清單。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added combo box. / 代表新增的組合方塊 OdfNode 節點。
AddDateField(string, string)
Short overload of AddDateField that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddDateField 多載。
public OdfNode AddDateField(string name, string label)
Parameters
Returns
- OdfNode
AddDateField(string, string, DateTime?)
Short overload of AddDateField that accepts name, label, and value; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 value;其餘可選參數使用預設值並轉呼叫最長 AddDateField 多載。
public OdfNode AddDateField(string name, string label, DateTime? value)
Parameters
Returns
- OdfNode
AddDateField(string, string, DateTime?, OdfLength?)
Short overload of AddDateField that accepts name, label, value, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value 與 x;其餘可選參數使用預設值並轉呼叫最長 AddDateField 多載。
public OdfNode AddDateField(string name, string label, DateTime? value, OdfLength? x)
Parameters
Returns
- OdfNode
AddDateField(string, string, DateTime?, OdfLength?, OdfLength?)
Short overload of AddDateField that accepts name, label, value, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddDateField 多載。
public OdfNode AddDateField(string name, string label, DateTime? value, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddDateField(string, string, DateTime?, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddDateField that accepts name, label, value, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddDateField 多載。
public OdfNode AddDateField(string name, string label, DateTime? value, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddDateField(string, string, DateTime?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds a date input control (form:date). 新增日期輸入控制項(form:date)。
public OdfNode AddDateField(string name, string label, DateTime? value, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name. / 控制項名稱。
labelstringThe label text. / 標籤文字。
valueDateTime?The default date. / 預設日期。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added date input. / 代表新增的日期輸入 OdfNode 節點。
AddGroupBox(string, string)
Short overload of AddGroupBox that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddGroupBox 多載。
public OdfNode AddGroupBox(string name, string label)
Parameters
Returns
- OdfNode
AddGroupBox(string, string, OdfLength?)
Short overload of AddGroupBox that accepts name, label, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 x;其餘可選參數使用預設值並轉呼叫最長 AddGroupBox 多載。
public OdfNode AddGroupBox(string name, string label, OdfLength? x)
Parameters
Returns
- OdfNode
AddGroupBox(string, string, OdfLength?, OdfLength?)
Short overload of AddGroupBox that accepts name, label, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddGroupBox 多載。
public OdfNode AddGroupBox(string name, string label, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddGroupBox(string, string, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddGroupBox that accepts name, label, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddGroupBox 多載。
public OdfNode AddGroupBox(string name, string label, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddGroupBox(string, string, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds a group box control (form:frame), used to group related controls under a title. 新增群組框控制項(form:frame),用於以標題群組相關控制項。
public OdfNode AddGroupBox(string name, string label, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name. / 控制項名稱。
labelstringThe group box title text. / 群組框標題文字。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added group box. / 代表新增的群組框 OdfNode 節點。
AddLabel(string, string)
Short overload of AddLabel that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddLabel 多載。
public OdfNode AddLabel(string name, string label)
Parameters
Returns
- OdfNode
AddLabel(string, string, OdfLength?)
Short overload of AddLabel that accepts name, label, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 x;其餘可選參數使用預設值並轉呼叫最長 AddLabel 多載。
public OdfNode AddLabel(string name, string label, OdfLength? x)
Parameters
Returns
- OdfNode
AddLabel(string, string, OdfLength?, OdfLength?)
Short overload of AddLabel that accepts name, label, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddLabel 多載。
public OdfNode AddLabel(string name, string label, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddLabel(string, string, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddLabel that accepts name, label, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddLabel 多載。
public OdfNode AddLabel(string name, string label, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddLabel(string, string, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds a fixed text label control (form:fixed-text). 新增文字標籤控制項(form:fixed-text)。
public OdfNode AddLabel(string name, string label, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name. / 控制項名稱。
labelstringThe text displayed by the label. / 標籤顯示的文字。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added label. / 代表新增的標籤 OdfNode 節點。
AddListBox(string, string)
Short overload of AddListBox that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddListBox 多載。
public OdfNode AddListBox(string name, string label)
Parameters
Returns
- OdfNode
AddListBox(string, string, IEnumerable<string>?)
Short overload of AddListBox that accepts name, label, and items; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 items;其餘可選參數使用預設值並轉呼叫最長 AddListBox 多載。
public OdfNode AddListBox(string name, string label, IEnumerable<string>? items)
Parameters
namestringlabelstringitemsIEnumerable<string>
Returns
- OdfNode
AddListBox(string, string, IEnumerable<string>?, OdfLength?)
Short overload of AddListBox that accepts name, label, items, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items 與 x;其餘可選參數使用預設值並轉呼叫最長 AddListBox 多載。
public OdfNode AddListBox(string name, string label, IEnumerable<string>? items, OdfLength? x)
Parameters
namestringlabelstringitemsIEnumerable<string>xOdfLength?
Returns
- OdfNode
AddListBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?)
Short overload of AddListBox that accepts name, label, items, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddListBox 多載。
public OdfNode AddListBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddListBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddListBox that accepts name, label, items, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、items、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddListBox 多載。
public OdfNode AddListBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddListBox(string, string, IEnumerable<string>?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds a list box control (form:listbox). 新增下拉式清單控制項(form:listbox)。
public OdfNode AddListBox(string name, string label, IEnumerable<string>? items, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name. / 控制項名稱。
labelstringThe label text. / 標籤文字。
itemsIEnumerable<string>The list of options for the list box. / 下拉選單的選項清單。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added list box. / 代表新增的下拉選單 OdfNode 節點。
AddNumericField(string, string)
Short overload of AddNumericField that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddNumericField 多載。
public OdfNode AddNumericField(string name, string label)
Parameters
Returns
- OdfNode
AddNumericField(string, string, double?)
Short overload of AddNumericField that accepts name, label, and value; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 value;其餘可選參數使用預設值並轉呼叫最長 AddNumericField 多載。
public OdfNode AddNumericField(string name, string label, double? value)
Parameters
Returns
- OdfNode
AddNumericField(string, string, double?, OdfLength?)
Short overload of AddNumericField that accepts name, label, value, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value 與 x;其餘可選參數使用預設值並轉呼叫最長 AddNumericField 多載。
public OdfNode AddNumericField(string name, string label, double? value, OdfLength? x)
Parameters
Returns
- OdfNode
AddNumericField(string, string, double?, OdfLength?, OdfLength?)
Short overload of AddNumericField that accepts name, label, value, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddNumericField 多載。
public OdfNode AddNumericField(string name, string label, double? value, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddNumericField(string, string, double?, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddNumericField that accepts name, label, value, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddNumericField 多載。
public OdfNode AddNumericField(string name, string label, double? value, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddNumericField(string, string, double?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds a numeric input control (form:number). 新增數值輸入控制項(form:number)。
public OdfNode AddNumericField(string name, string label, double? value, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name. / 控制項名稱。
labelstringThe label text. / 標籤文字。
valuedouble?The default numeric value. / 預設數值。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added numeric input. / 代表新增的數值輸入 OdfNode 節點。
AddRadioButton(string, string)
Short overload of AddRadioButton that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddRadioButton 多載。
public OdfNode AddRadioButton(string name, string label)
Parameters
Returns
- OdfNode
AddRadioButton(string, string, bool)
Short overload of AddRadioButton that accepts name, label, and isSelected; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 isSelected;其餘可選參數使用預設值並轉呼叫最長 AddRadioButton 多載。
public OdfNode AddRadioButton(string name, string label, bool isSelected)
Parameters
Returns
- OdfNode
AddRadioButton(string, string, bool, OdfLength?)
Short overload of AddRadioButton that accepts name, label, isSelected, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isSelected 與 x;其餘可選參數使用預設值並轉呼叫最長 AddRadioButton 多載。
public OdfNode AddRadioButton(string name, string label, bool isSelected, OdfLength? x)
Parameters
Returns
- OdfNode
AddRadioButton(string, string, bool, OdfLength?, OdfLength?)
Short overload of AddRadioButton that accepts name, label, isSelected, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isSelected、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddRadioButton 多載。
public OdfNode AddRadioButton(string name, string label, bool isSelected, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddRadioButton(string, string, bool, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddRadioButton that accepts name, label, isSelected, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、isSelected、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddRadioButton 多載。
public OdfNode AddRadioButton(string name, string label, bool isSelected, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddRadioButton(string, string, bool, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds a radio button control (form:radio). 新增單選按鈕控制項(form:radio)。
public OdfNode AddRadioButton(string name, string label, bool isSelected, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name; radio buttons in the same group should share the same name. / 控制項名稱;同一群組內的單選按鈕應使用相同名稱。
labelstringThe displayed label text. / 顯示的標籤文字。
isSelectedboolThe default selected state. / 預設選取狀態。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added radio button. / 代表新增的單選按鈕 OdfNode 節點。
AddTextBox(string, string)
Short overload of AddTextBox that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddTextBox 多載。
public OdfNode AddTextBox(string name, string label)
Parameters
Returns
- OdfNode
AddTextBox(string, string, string?)
Short overload of AddTextBox that accepts name, label, and defaultValue; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 defaultValue;其餘可選參數使用預設值並轉呼叫最長 AddTextBox 多載。
public OdfNode AddTextBox(string name, string label, string? defaultValue)
Parameters
Returns
- OdfNode
AddTextBox(string, string, string?, OdfLength?)
Short overload of AddTextBox that accepts name, label, defaultValue, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、defaultValue 與 x;其餘可選參數使用預設值並轉呼叫最長 AddTextBox 多載。
public OdfNode AddTextBox(string name, string label, string? defaultValue, OdfLength? x)
Parameters
Returns
- OdfNode
AddTextBox(string, string, string?, OdfLength?, OdfLength?)
Short overload of AddTextBox that accepts name, label, defaultValue, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、defaultValue、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddTextBox 多載。
public OdfNode AddTextBox(string name, string label, string? defaultValue, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddTextBox(string, string, string?, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddTextBox that accepts name, label, defaultValue, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、defaultValue、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddTextBox 多載。
public OdfNode AddTextBox(string name, string label, string? defaultValue, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddTextBox(string, string, string?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds a text box control (form:text). 新增文字框控制項(form:text)。
public OdfNode AddTextBox(string name, string label, string? defaultValue, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name. / 控制項名稱。
labelstringThe label text. / 標籤文字。
defaultValuestringThe default text content. / 預設文字內容。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added text box. / 代表新增的文字框 OdfNode 節點。
AddTimeField(string, string)
Short overload of AddTimeField that accepts name and label; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 label;其餘可選參數使用預設值並轉呼叫最長 AddTimeField 多載。
public OdfNode AddTimeField(string name, string label)
Parameters
Returns
- OdfNode
AddTimeField(string, string, TimeSpan?)
Short overload of AddTimeField that accepts name, label, and value; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label 與 value;其餘可選參數使用預設值並轉呼叫最長 AddTimeField 多載。
public OdfNode AddTimeField(string name, string label, TimeSpan? value)
Parameters
Returns
- OdfNode
AddTimeField(string, string, TimeSpan?, OdfLength?)
Short overload of AddTimeField that accepts name, label, value, and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value 與 x;其餘可選參數使用預設值並轉呼叫最長 AddTimeField 多載。
public OdfNode AddTimeField(string name, string label, TimeSpan? value, OdfLength? x)
Parameters
Returns
- OdfNode
AddTimeField(string, string, TimeSpan?, OdfLength?, OdfLength?)
Short overload of AddTimeField that accepts name, label, value, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x 與 y;其餘可選參數使用預設值並轉呼叫最長 AddTimeField 多載。
public OdfNode AddTimeField(string name, string label, TimeSpan? value, OdfLength? x, OdfLength? y)
Parameters
Returns
- OdfNode
AddTimeField(string, string, TimeSpan?, OdfLength?, OdfLength?, OdfLength?)
Short overload of AddTimeField that accepts name, label, value, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、label、value、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 AddTimeField 多載。
public OdfNode AddTimeField(string name, string label, TimeSpan? value, OdfLength? x, OdfLength? y, OdfLength? width)
Parameters
Returns
- OdfNode
AddTimeField(string, string, TimeSpan?, OdfLength?, OdfLength?, OdfLength?, OdfLength?)
Adds a time input control (form:time). 新增時間輸入控制項(form:time)。
public OdfNode AddTimeField(string name, string label, TimeSpan? value, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)
Parameters
namestringThe control name. / 控制項名稱。
labelstringThe label text. / 標籤文字。
valueTimeSpan?The default time. / 預設時間。
xOdfLength?The X-axis position. / X 軸座標位置。
yOdfLength?The Y-axis position. / Y 軸座標位置。
widthOdfLength?The control width. / 控制項寬度。
heightOdfLength?The control height. / 控制項高度。
Returns
- OdfNode
The OdfNode node representing the added time input. / 代表新增的時間輸入 OdfNode 節點。
SetControlEvent(OdfNode, string, string)
Short overload of SetControlEvent that accepts controlNode, eventName, and macroName; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 controlNode、eventName 與 macroName;其餘可選參數使用預設值並轉呼叫最長 SetControlEvent 多載。
public void SetControlEvent(OdfNode controlNode, string eventName, string macroName)
Parameters
SetControlEvent(OdfNode, string, string, string)
Binds an event listener to a control (office:event-listeners/script:event-listener).
為控制項繫結一個事件監聽器(office:event-listeners/script:event-listener)。
public void SetControlEvent(OdfNode controlNode, string eventName, string macroName, string language)
Parameters
controlNodeOdfNodeThe control node to bind the event to. / 要繫結事件的控制項節點。
eventNamestringThe event name (e.g.
form:approveaction). / 事件名稱(例如form:approveaction)。macroNamestringThe macro name or location. / 巨集名稱或位置。
languagestringThe macro language, defaulting to
ooo:script. / 巨集語言,預設為ooo:script。
Exceptions
- ArgumentNullException
- ArgumentException
When
eventNameormacroNameis blank. / 當eventName或macroName為空白時擲出。
SetControlMaxLength(OdfNode, int)
Sets the maximum character length allowed for input in a control (corresponding to form:max-length).
設定控制項允許輸入的最大字元長度(對應 form:max-length)。
public void SetControlMaxLength(OdfNode controlNode, int maxLength)
Parameters
controlNodeOdfNodeThe control node. / 控制項節點。
maxLengthintThe maximum character length;
0means unlimited. / 最大字元長度;0表示不限制。
Exceptions
- ArgumentNullException
- ArgumentOutOfRangeException
When
maxLengthis negative. / 當maxLength為負數時擲出。
SetControlRequired(OdfNode, bool)
Sets whether a control is required (corresponding to form:input-required).
設定控制項是否為必填(對應 form:input-required)。
public void SetControlRequired(OdfNode controlNode, bool required)
Parameters
controlNodeOdfNodeThe control node. / 控制項節點。
requiredboolWhether the control is required. / 是否必填。