Kexi/Handbook/Building Simple Databases/Designing Forms/Inserting widgets - text fields: Difference between revisions

From KDE UserBase Wiki
(Small clarification)
m (grammatical edits to improve readability)
Line 4: Line 4:


<!--T:2-->
<!--T:2-->
Let's create a form providing information about persons, i.e. a form connected it with '''''Persons''''' table.  
Let us create a form to show information about persons, i.e. a form connected to the '''''Persons''''' table.  


<!--T:3-->
<!--T:3-->
If the form being designed should present data obtained from the database, you need to place appropriate fields on it. To do this, use the buttons on the <menuchoice>Widgets</menuchoice> toolbar. Each button corresponds to a single widget type.  
As the form is to be designed to present data obtained from the Person's table, we need to place appropriate fields onto it. To do this we will use the buttons on the <menuchoice>Widgets</menuchoice> toolbar. Each button corresponds to a single widget type.  


<!--T:4-->
<!--T:4-->
Line 13: Line 13:
<translate>
<translate>
<!--T:8-->
<!--T:8-->
# Click on the form surface with the left mouse button. A new text box widget will be placed in the point where you clicked. Before you release you can drag your mouse to specify a desired size for the widget. </translate>
# Click on the form surface with the left mouse button. A new text box widget will be placed at the point where you clicked. Before you release you can drag your mouse to specify a desired size for the widget. </translate>
<translate>
<translate>
<!--T:9-->
<!--T:9-->
# If needed, move the inserted widget using drag & drop to a desired position. You can resize the widget afterwards by dragging one of the small boxes appearing near its corners. Note that the boxes are only visible when the widget is selected. If you select another widget or the form surface, the boxes disappear. </translate>
# If needed, move the inserted widget using drag & drop to the desired position. You can resize the widget afterwards by dragging one of the small boxes appearing near its corners. Note that the boxes are only visible when the widget is selected. If you select another widget or the form surface, the boxes disappear. </translate>
<translate>
<translate>
<!--T:10-->
<!--T:10-->
# Click the <menuchoice>Text Box</menuchoice> toolbar button again and click on the form surface to insert another widget. Repeat this action once again until you get three more text boxes inserted in your form. For the sake of simplicity we will limit ourselves to five data fields.  
# Click the <menuchoice>Text Box</menuchoice> toolbar button again and click on the form surface to insert another widget. Repeat this action until you have a total of five text boxes on your form. (For the sake of simplicity we limit ourselves to five data fields).  


<!--T:5-->
<!--T:5-->
{{Note|
{{Note|
* There is a context menu available in form's design mode, activated by a right mouse button click the desired widget or the form's surface. The menu offers commands like <menuchoice>Cut</menuchoice>, <menuchoice>Copy</menuchoice>, <menuchoice>Paste</menuchoice>, <menuchoice>Delete</menuchoice> and other, more complex. <!--FIXME no menubar in master/2.4 Many of the commands are also provided in the menubar, usually <menuchoice>Edit</menuchoice>.--> Keyboard shortcuts are also available for these commands. Some of the commands are only available for certain types of widgets. <!--}}-->
* There is a context menu available in Form Design mode, activated by a right mouse button click on the desired widget or the form's surface. The menu offers commands like <menuchoice>Cut</menuchoice>, <menuchoice>Copy</menuchoice>, <menuchoice>Paste</menuchoice>, <menuchoice>Delete</menuchoice> and other, more complex options. <!--FIXME no menubar in master/2.4 Many of the commands are also provided in the menubar, usually <menuchoice>Edit</menuchoice>.--> Keyboard shortcuts are also available for these commands. Some of the commands are only available for certain types of widgets. <!--}}-->


<!--T:11-->
<!--T:11-->
Line 29: Line 29:


<!--T:12-->
<!--T:12-->
* Holding the <keycap>Ctrl</keycap> key down while clicking a widget allows to select multiple widgets.  
* Holding the <keycap>Ctrl</keycap> key down while clicking a widget allows selection of multiple widgets.  


<!--T:13-->
<!--T:13-->

Revision as of 18:14, 27 August 2015

Other languages:

Inserting widgets - text fields

Let us create a form to show information about persons, i.e. a form connected to the Persons table.

As the form is to be designed to present data obtained from the Person's table, we need to place appropriate fields onto it. To do this we will use the buttons on the Widgets toolbar. Each button corresponds to a single widget type.

  1. Click Text Box button on the Widgets toolbar.
  2. Click on the form surface with the left mouse button. A new text box widget will be placed at the point where you clicked. Before you release you can drag your mouse to specify a desired size for the widget.
  3. If needed, move the inserted widget using drag & drop to the desired position. You can resize the widget afterwards by dragging one of the small boxes appearing near its corners. Note that the boxes are only visible when the widget is selected. If you select another widget or the form surface, the boxes disappear.
  4. Click the Text Box toolbar button again and click on the form surface to insert another widget. Repeat this action until you have a total of five text boxes on your form. (For the sake of simplicity we limit ourselves to five data fields).

Note

* There is a context menu available in Form Design mode, activated by a right mouse button click on the desired widget or the form's surface. The menu offers commands like Cut, Copy, Paste, Delete and other, more complex options. Keyboard shortcuts are also available for these commands. Some of the commands are only available for certain types of widgets.
  • The commands Cut, Copy and Paste makes it possible to move or copy widgets between forms, even between separate database projects.
  • Holding the Ctrl key down while clicking a widget allows selection of multiple widgets.
  • Instead of using Copy and Paste commands, to duplicate a widget within the same form you can hold down the Ctrl key while moving the widget. After the mouse button is released, the dragged widget will not be moved but copied in the new location.