フォームコントロール

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

このコマンドの見つけ方

Choose View - Toolbars - Form Controls.

挿入 ツールバーにあるアイコン(初期設定では見えないこのアイコンを有効にする必要があります):

Icon Select

フォームコントロール


note

XML フォームドキュメント (XForms) には、同じコントロールセットが使用されます。


フォームを作成するには、ドキュメントを開き、フォームコントロールツールバーを使用して、フォームコントロールを追加および指定します。フォームをデータベースにリンクさせて、コントロールを使用してデータベースを操作することもできます。

HTML ドキュメントでフォームを作成すると、そのフォームを使用して、インターネット経由でデータを送ることができます。

ドキュメントにコントロールを追加する

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

  2. Then click in the document, and drag to create the control.

    tip

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


tip

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 +Shift when you drag a column head.


コントロールの変更

  1. Right-click the control and choose Control Properties. A dialog opens where you can define the properties of the control.

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

  3. ドキュメント間でコントロールをコピーするには、ドラッグ&ドロップで操作することも、コピーしたコントロールをクリップボード経由で新規ドキュメントに貼り付けることでも行えます。このとき LibreOffice は、見出しページ フォームの属性データ の「データベース」、「内容の種類」「内容」の 3 つの属性を解析して、ターゲットドキュメントの論理構造上の正確な位置に挿入するようにします。たとえばアドレス帳のデータを表示するコントロールをコピーしたのであれば、コピー先のターゲットドキュメント上でも、アドレス帳のデータを表示し続けます。

選択

Icon Select

このアイコンをクリックすると、マウスポインターが選択モードに切り替わるか、選択モードが終了するかします。現在のフォームのコントロールを選択する場合に選択モードを使用します。

Design Mode

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.

Icon Design Mode

Design Mode On/Off

ウィザードのオン/オフ

Icon Toggle Form Control Wizards

自動フォームコントロールウィザードのオン/オフを切り替えます。

これらのウィザードは、リストボックスやテーブルコントロールなどのコントロールのプロパティの入力に役立ちます。

フォームデザイン

Icon Form Design Tools

「フォームデザイン」 ツールバーを開きます。

ラベルフィールド

Icon Label Field

テキスト表示用のフィールドが作成されます。 これらのラベルは、定義済みのテキストを表示するためにのみ使用します。このフィールドには、入力できません。

テキストボックス

Icon Text Box

テキストボックスを作成します。 テキストボックスはユーザーがテキストを入力できるフィールドです。フォーム内では、テキストボックスにデータを表示したり、新しいデータを入力したりできます。

チェックボックス

Icon Check Box

チェックボックスが作成されます。 チェックボックスを使用すると、フォーム内の機能を使用可能にしたり無効にしたりすることができます。

ラジオボタン

Icon Option Button

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.

リストボックス

Icon List 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.

コンボボックス

Icon Combo Box

コンボボックスを作成します。 コンボボックスとは、ユーザーがオプションを選択できるドロップダウンリストの付いた、単一行リストボックスです。「読み取り専用」プロパティを割り当て、リストに含まれている項目だけをユーザーが入力できるようにすることができます。フォームがデータベースにバインドされていて、データベース接続がアクティブな場合、ドキュメントにコンボボックスを挿入すると、コンボボックスウィザード が自動的に開始されます。

ボタン

Icon Push Button

ボタンを作成します。 ボタンは、マウスクリックなど、定義済みのイベントに対応してコマンドを実行するために使用することができます。

ボタンには、テキストおよび図を表示できます。

イメージボタン

Icon image button

画像として表示されるボタンを作成します。 イメージボタンのプロパティは、画像が表示されることを除いて、「通常」のボタンと同じです。

書式設定されたフィールド

Icon Formatted Field

書式付きフィールドを作成します。 書式付きフィールドとは、入力および出力の書式設定方法を指定したり、値の制限を適用したりすることができるテキストボックスです。

書式設定されたフィールドは、特別なコントロール属性 を有しています(書式 → コントロール)。

日付フィールド

Icon Date Field

日付フィールドが作成されます。 フォームがデータベースにリンクされている場合には、日付の値をデータベースから取得できます。

If you assign the "Dropdown" property to the date field, the user can open a calendar to select a date under the date field. This also applies to a date field within a Table Control field.

tip

ユーザーは上下の矢印キーを使って日付フィールドを容易に編集できます。カーソルがある位置に応じて、年月日を矢印キーで増減することができます。


日付フィールドに関する特別な注意

数字フィールド

Icon Numerical Field

数値フィールドが作成されます。 フォームがデータベースにリンクされている場合には、フォーム内の数値フィールドの内容をデータベースから取得できます。

グループボックス

Icon Group Box

Creates a frame to visually group several controls. Group boxes allow you to group option buttons in a frame.

If you insert a group frame into the document, the Group Element Wizard starts, which allows you to easily create an option group.

Note: When you drag a group box over already existing controls and then want to select a control, you have to first open the context menu of the group box and choose Arrange - Send to Back. Then select the control while pressing .

note

Group boxes are used only for a visual effect. A functional grouping of option fields can be made through the name definition: under the Name properties of all option fields, enter the same name in order to group them.


時刻フィールド

Icon Time Field

時刻フィールドが作成されます。 フォームがデータベースにリンクされている場合には、フォーム内の時刻フィールドの値をデータベースから取得できます。

tip

ユーザーは上下の矢印キーを使って時刻フィールドを容易に編集できます。カーソルがある位置に応じて、時分秒を矢印キーで増減することができます。


通貨フィールド

Icon Currency Field

通貨フィールドが作成されます。 フォームがデータベースにリンクされている場合には、フォーム内の通貨フィールドの内容をデータベースから取得できます。

パターンフィールド

Icon Pattern Field

パターンフィールドを作成します。 パターンフィールドは、編集マスクとリテラルマスクで構成されています。編集マスクには、入力可能なデータを指定します。リテラルマスクには、フォームの読み込み時のパターンフィールドの内容を指定します。

note

HTML書式の場合、パターンフィールドは考慮しません。


テーブルコントロール

Icon Table Control

Creates a table control to display a database table. If you create a new table control, the Table Element Wizard appears.

テーブルコントロールに関する特別な注意

ナビゲーションバー

Icon Navigation bar

Creates a Navigation bar.

The Navigation bar allows you to move through the records of a database or a database form. The controls on this Navigation bar work the same way as the controls on the default Navigation bar in LibreOffice.

イメージコントロール

Icon Image Control

イメージコントロールを作成します。データベースから画像を追加するためにだけ使用できます。 フォームドキュメントで、これらのコントロールの 1 つをダブルクリックすると、画像を挿入するために 図の挿入 ダイアログが表示されます。画像を挿入したり削除したりするためのコマンドの入ったコンテキストメニューもあります (デザインモードでは表示されません)。

データベースからのイメージをフォームに表示できます。また、イメージコントロールが書き込み保護されていない限り、新しいイメージをデータベースに挿入することも可能です。イメージコントロールは、イメージタイプのデータベースフィールドを参照する必要があります。したがって、属性ウィンドウのデータタブページには、イメージタイプのデータフィールドを入力します。

ファイルの選択

Icon File Selection

ファイルの選択を可能にするボタンが作成されます。

スピンボタン

Icon Spin Button

スピンボタンを作成します。

Calc 表計算ドキュメントにスピンボタンを追加した場合、データ タブページを使用して、スピンボタンとセルの間に双方向リンクを作成できます。その結果、セルの内容を変更すると、スピンボタンの内容が更新されます。逆に、スピンボタンの値を変更すると、セルの内容が更新されます。

スクロールバー

Icon Scrollbar

スクロールバーを作成します。

スクロールバーには以下のプロパティを指定できます。

UI 名

セマンティクス

スクロールの最小値

スクロールバーの最小の高さまたは幅を指定します。

スクロールの最大値

スクロールバーの最大の高さまたは幅を指定します。

標準スクロール値

スクロールバーの標準の高さまたは幅を指定します。

方向

スクロールバーの方向、つまり垂直または水平を指定します。

わずかな変更

スクロールバーをスクロールさせる最小値、たとえば矢印をクリックしたときの移動量を指定します。

大幅な変更

スライダと矢印の間をクリックするなどして、スクロールバーを大きくスクロールさせた場合のスクロール量を指定します。

遅延

スクロールバーによって引き起こされるイベントとイベントの間の時間をミリセカンドで指定します。たとえば、スクロールバーの矢印ボタンをクリックしてマウスボタンを押した状態にした時の遅延時間などが相当します。

記号の色

スクロールバー上の矢印の色を指定します。

表示サイズ

Specifies the size of the scrollbar thumb in "value units". For example, a value of ("Scroll value max." minus "Scroll value min.") / 2 results in a scrollbar thumb that occupies half of the scrollbar.

To make the width of the scrollbar equal to the height of the scrollbar, set the Visible Size to zero.


In a Calc spreadsheet, you can use the Data tab page to create a two-way link between a scrollbar and a cell.

ご支援をお願いします!