[Gambas-user] What is the 'Action' e.g when constructing a menu

Doriano Blengino doriano.blengino at ...1909...
Sun Sep 28 17:38:49 CEST 2008


richard terry ha scritto:
> I've often wondered what/how this is used.
>
> For example in the menu editor one gives the names, group, tag, and then there 
> is an action textbox ? what for
>
> Any info/example appreciated, and thanks in advance.
>
> Richard
>   
You can use an "Action" to group together items (like menu items or 
buttons) which can throw "actions". For example, you can have a button 
and menu item which both save the file currently edited. You can 
associate them together by assigning to them the action "SaveFile". 
Then, you can enable or disable they together by executing:

  action["SaveFile"].Enabled = FALSE


In a complex application, where you can have many items related to a 
single state, this can help to simplfy the work.
It is planned to extend this, and add more functionalities.






More information about the User mailing list