[Gambas-user] Creating Actions at runtime
Gianluigi
bagonergi at gmail.com
Thu Sep 27 09:57:14 CEST 2018
Il giorno gio 27 set 2018 alle ore 05:34 Me <adamnt42 at gmail.com> ha scritto:
> On Fri, 21 Sep 2018 09:49:27 +0200
> Gianluigi <bagonergi at gmail.com> wrote:
>
> > Thanks Gianluigi. (I missed your post somehow the other day).
>
> Well, it looks like what I wanted to do is not possible.
>
> Some observations. (Mainly for my own interest as I will probably need to
> refer to this later in time.)
> 1) The Action.Configure() function uses the form defined in the gb.gui.mdi
> component.
> Which is interesting! At least I was able to redefine the size of the
> pop-up to something more
> reasonable.
> 1a) That shortcut editor only looks at the files in the .action
> sub-directory (or the executable archive
> version thereof) of the active project to build its' list of "editable"
> actions. In addition, it will only add
> actions that have a defined shortcut already.
> This then, means that all user configurable shortcuts must be defined
> statically in the project design as
> that is the only way they will get into the .action files.
> 2) Really bewildering! Creating a menu item at runtime, works. Further,
> the Action and Shortcut defined
> in the code operate as expected. I can evidence this by creating a couple
> of menus in the code, one of
> which hides or shows the other using the Action defined for the other.
> However, these items do not
> appear in the Action,List array?
> I thought I might be able to use the Action.List array and build my own
> shortcut editor. No joy.
>
>
> --
> Me <adamnt42 at gmail.com>
>
>
I think that to take advantage of Action and make the menus appear as
needed the only way is to create hidden menus (only the Name without
Caption) and command them at runtime.
I enclose a small project (not yet finished) that I'm creating to be able
to ask a question to Benoit (I apologize for the name :-) ).
One of the features of Gambas is the simplicity and speed with which we can
create the windows.
Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180927/afbce3fd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GPW-1-0.0.1.tar.gz
Type: application/gzip
Size: 57850 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180927/afbce3fd/attachment-0001.gz>
More information about the User
mailing list