[Gambas-user] menu action

Stefano Palmeri rospolosco at ...152...
Tue Sep 1 17:39:28 CEST 2009


Il martedì 1 settembre 2009 10:28:25 Benoît Minisini ha scritto:
> > Hi Gambas users.
> > Is it possible to assign some action to a menu directly (this menu has
> > just one item and it is silly to click first on a menu and then on the
> > only item) Alternatively, Is it possible to place a simple button on a
> > menu line of the form?
> > Also is there any way (I cannot find it, sorry) to change  menu color
> > like it is possible for the form background?
> > Aleks
>
> No, no, no.
>
> 1) A menu title cannot act like a button.
>

Yes, it can ;-)

I've attached an example. 
Just click on the menu title and you throw two dices.
It uses the Show event. Not clean but it works.

Saluti,

Stefano

> 2) You can only put menu title in the menu bar.
>
> 3) The menu background color is controled by the underlying widget style,
> and does not care most of the time with the background color you want.
>
> Sorry!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: one-item-menu-0.0.1.tar.gz
Type: application/x-tgz
Size: 7798 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20090901/ba60b5f9/attachment.bin>


More information about the User mailing list