[Gambas-user] Modifying the popup menu on workspace tab

Benoit Minisini gambas at ...1...
Wed Mar 12 00:22:51 CET 2008


On mardi 11 mars 2008, richard terry wrote:
> Currently when I add a new panel or form to the workspace, a tab appears
> where I can set the title.
>
> If I right mouse click on the tab there is a menu there which I didn't
> create, just with the name on the tab and a checkbox (checked) and a close
> current tab.
>
> I'd like to be able to have my own menu in place of this, is it possible?
>
> Regards
>
> Richard
>

This is not directly possible at the moment.

But you can hack it by finding the Workspace TabStrip: it is the parent of 
every MDI child window. Then you create an Observer on the TabStrip, and 
implements the Menu event. Then you call STOP EVENT in your Menu event 
handler before returning, so that the default Workspace Menu event handler is 
not called.

Regards,

-- 
Benoit Minisini




More information about the User mailing list