Kexi/Handbook/Building Simple Databases/Designing Forms/Actions: Difference between revisions
(Marked this version for translation) |
(Splitting lists into smaller units) |
||
Line 16: | Line 16: | ||
<!--T:6--> | <!--T:6--> | ||
# Switch to form's '''Design View''' if you have not done yet. | # Switch to form's '''Design View''' if you have not done yet.</translate> | ||
# Select the existing button widget by clicking on it or put a new button widget onto the form. If you inserted a new button, enter its title and press <keycap>Enter</keycap> key. | <translate> | ||
# Click the button widget with the right mouse button to display the context menu. | # Select the existing button widget by clicking on it or put a new button widget onto the form. If you inserted a new button, enter its title and press <keycap>Enter</keycap> key. </translate> | ||
# From the context menu select <menuchoice>Assign action...</menuchoice> command. | <translate> | ||
# An '''Assigning Action to Command Button''' dialog window will appear presenting a list of available actions. One of the actions is selected if the widget already has action assigned. Otherwise the '''Action type''' drop down list has the <menuchoice>No</menuchoice> type item selected. | # Click the button widget with the right mouse button to display the context menu. </translate> | ||
# From the '''Action''' type drop down list select <menuchoice>Application</menuchoice> item. Available application-wide actions will be listed. | <translate> | ||
# Select one of the actions on the list (e.g. <menuchoice>Delete Row</menuchoice>). | # From the context menu select <menuchoice>Assign action...</menuchoice> command. </translate> | ||
<translate> | |||
# An '''Assigning Action to Command Button''' dialog window will appear presenting a list of available actions. One of the actions is selected if the widget already has action assigned. Otherwise the '''Action type''' drop down list has the <menuchoice>No</menuchoice> type item selected. </translate> | |||
<translate> | |||
# From the '''Action''' type drop down list select <menuchoice>Application</menuchoice> item. Available application-wide actions will be listed. </translate> | |||
<translate> | |||
# Select one of the actions on the list (e.g. <menuchoice>Delete Row</menuchoice>).</translate> | |||
<translate> | |||
# Click the <menuchoice>OK</menuchoice> button or press the <keycap>Enter</keycap> key to accept your selection. | # Click the <menuchoice>OK</menuchoice> button or press the <keycap>Enter</keycap> key to accept your selection. | ||
Line 30: | Line 37: | ||
<!--T:8--> | <!--T:8--> | ||
{{Note| | {{Note| | ||
* To remove an action assignment, select <menuchoice>No</menuchoice> type item from the '''Action type''' drop down list of the '''Assigning Action to Command Button''' dialog window. | * To remove an action assignment, select <menuchoice>No</menuchoice> type item from the '''Action type''' drop down list of the '''Assigning Action to Command Button''' dialog window. <!--}}--> | ||
* Actions only work in the form's data view. Not every action's assignment is reasonable. For example, the <menuchoice>Font...</menuchoice> action is available in data view, but only if you have a widget selected in the '''Design View'''. If you make changes to the font settings the changes are applied to the text of that selected widget.}} | |||
* Actions only work in the form's data view. Not every action's assignment is reasonable. For example, the <menuchoice>Font...</menuchoice> action is available in data view, but only if you have a widget selected in the '''Design View'''. If you make changes to the font settings the changes are applied to the text of that selected widget.}} <!--{{--> | |||
<!--T:9--> | <!--T:9--> |
Revision as of 12:52, 18 December 2011
Actions
An Action is a single activity isolated in the application, available for the user to execute. It can also be executed automatically as a reaction for a given event (e.g. after opening a form).
Assigning actions to form buttons
Many actions can be assigned to form button. The assigned action is executed after button is clicked.
To assign action:
- Switch to form's Design View if you have not done yet.
- Select the existing button widget by clicking on it or put a new button widget onto the form. If you inserted a new button, enter its title and press Enter key.
- Click the button widget with the right mouse button to display the context menu.
- From the context menu select command.
- An Assigning Action to Command Button dialog window will appear presenting a list of available actions. One of the actions is selected if the widget already has action assigned. Otherwise the Action type drop down list has the type item selected.
- From the Action type drop down list select item. Available application-wide actions will be listed.
- Select one of the actions on the list (e.g. ).
- Click the Enter key to accept your selection. button or press the
After switching to the form's data view you can try whether the action works. For example, if you assigned Ctrl+Delete) menu command (depending on your settings you may be asked to confirm the removal).
action, clicking the button, the current database row will be deleted, similarly to executing (Note
* To remove an action assignment, select
type item from the Action type drop down list of the Assigning Action to Command Button dialog window.
- Actions only work in the form's data view. Not every action's assignment is reasonable. For example, the action is available in data view, but only if you have a widget selected in the Design View. If you make changes to the font settings the changes are applied to the text of that selected widget.