Kexi/Handbook/Building Simple Databases/Designing Forms/Actions: Difference between revisions
Appearance
add translation tags |
No edit summary |
||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
<translate> | <translate> | ||
====Actions==== | ====Actions==== <!--T:1--> | ||
<!--T:2--> | |||
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). | 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 ===== <!--T:3--> | |||
<!--T:4--> | |||
Many actions can be assigned to form button. The assigned action is executed after button is clicked. | Many actions can be assigned to form button. The assigned action is executed after button is clicked. | ||
<!--T:5--> | |||
To assign action: | To assign action: | ||
# Switch to form's | <!--T:6--> | ||
# 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. | # Switch to form's Design view if you have not done yet.</translate> | ||
# Click the button widget with the right mouse button to display the context menu. | <translate> | ||
# From the context menu select <menuchoice>Assign action...</menuchoice> command. | <!--T:11--> | ||
# An '''Assigning Action to | # 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 '''Action''' | <translate> | ||
# Select one of the actions on the list (e.g. <menuchoice>Delete | <!--T:12--> | ||
# Click the <menuchoice>OK</menuchoice> button or press the <keycap>Enter</keycap> key to accept your selection. | # Click the button widget with the right mouse button to display the context menu. </translate> | ||
<translate> | |||
<!--T:13--> | |||
# From the context menu select <menuchoice>Assign action...</menuchoice> command. </translate> | |||
<translate> | |||
<!--T:14--> | |||
# An '''Assigning Action to 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 category''' list has the <menuchoice>No action</menuchoice> item selected. </translate> | |||
<translate> | |||
<!--T:15--> | |||
# From the '''Action category''' list select <menuchoice>Application actions</menuchoice> item. Available application-wide actions will be listed. </translate> | |||
<translate> | |||
<!--T:16--> | |||
# Select one of the actions on the list (e.g. <menuchoice>Delete Selected object</menuchoice>).</translate> | |||
<translate> | |||
<!--T:17--> | |||
<!--dialog closes immediately after clicking an action in the list | |||
# Click the <menuchoice>OK</menuchoice> button or press the <keycap>Enter</keycap> key to accept your selection. --> | |||
After switching to the form's data view you can try whether the action works. For example, if you assigned <menuchoice>Delete Row</menuchoice> action, clicking the button, the current database row will be deleted, similarly to executing <menuchoice>Edit->Delete Row</menuchoice> (<keycap>Ctrl+Delete</keycap>) menu command (depending on your settings you may be asked to confirm the removal). | <!--T:7--> | ||
After switching to the form's data view you can try whether the action works. <!--FIXME not in master/2.4 For example, if you assigned <menuchoice>Delete Row</menuchoice> action, clicking the button, the current database row will be deleted, similarly to executing <menuchoice>Edit->Delete Row</menuchoice> (<keycap>Ctrl+Delete</keycap>) menu command (depending on your settings you may be asked to confirm the removal). --> | |||
{{Note| | <!--T:8--> | ||
{{Note|To remove an action assignment, select the <menuchoice>No action</menuchoice> item from the '''Action category''' list of the '''Assigning Action to Button''' dialog window. <!--}}--> | |||
<!--T:18--> | |||
* Actions only work in the form's data view. Not every action's assignment is reasonable. For example, the <!--FIXME in master/2.4 no Font action available???--><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--> | |||
{{Prevnext2 | {{Prevnext2 | ||
|prevpage=Special:MyLanguage/Kexi/Handbook/Building_Simple_Databases/Designing_Forms/Inserting_text_labels | |prevpage=Special:MyLanguage/Kexi/Handbook/Building_Simple_Databases/Designing_Forms/Inserting_text_labels | ||
|prevtext=Inserting text labels | |prevtext=Inserting text labels | ||
|nextpage=Special:MyLanguage/Kexi/Handbook/Building_Simple_Databases/ | |nextpage=Special:MyLanguage/Kexi/Handbook/Building_Simple_Databases/Entering Data Using Forms | ||
|nexttext= | |nexttext=Entering Data Using Forms | ||
|index=Special:MyLanguage/Kexi/Handbook|indextext=Back to menu | |index=Special:MyLanguage/Kexi/Handbook|indextext=Back to menu | ||
}} | }} | ||
<!--T:10--> | |||
[[Category:Kexi]] | [[Category:Kexi]] | ||
[[Category:Tutorials]] | [[Category:Tutorials]] | ||
</translate> | </translate> |
Latest revision as of 20:42, 25 December 2024
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 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 category list has the item selected.
- From the Action category list select item. Available application-wide actions will be listed.
- Select one of the actions on the list (e.g. ).
After switching to the form's data view you can try whether the action works.