Kexi/Håndbog/Byg en enkel database/Design af formularer/Indsæt en kontrol - tekstfelter

From KDE UserBase Wiki
Revision as of 07:11, 20 April 2012 by Claus chr (talk | contribs) (Importing a new version from external source)
Other languages:

Indsæt en kontrol - tekstfelter

LAd os oprette en formular med information om personer, dvs. en formular forbundet til tabellen personer.

For at formularen kan fremvise data fra databasen, så skal du placere passende kontroller på den. Til at gøre dette kan du bruge knapperne i værktøjslisten Formulardesign. Hver knap svarer til en bestemt type kontrol.

  1. Klik på knappen Tekstfelt i værktøjslinjen Formulardesign.
  2. Klik i formularen. En ny tekstboks bliver nu placeret der, hvor du klikkede. Før du slipper museknappen kan du trække musen for at angive kontrollens ønskede størrelse.
  3. 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.
  4. Click the Text Box toolbar button again and click on the form surface to insert another widget. Repeat this action once again until you get three text boxes inserted in your form. For sake of simplicity we will limit ourselves to three data fields.

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 Cut, Copy, Paste, Delete and other, more complex. 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 to select 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.