[Gambas-user] Modifying the popup menu on workspace tab
richard terry
rterry at ...1822...
Wed Mar 12 21:43:13 CET 2008
On Wed, 12 Mar 2008 10:22:51 am Benoit Minisini wrote:
> 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.
Not much success I wonder if you could tell me what's wrong:
I have a text editor + buttons on a form called frmText editor
On my Main form I create a new frm and add it to the workspace:
At the top of the form I did
public hObs as Observor
In the routine I add each page I put:
Newpage = NEW frmTextEditor
WorkspaceEditor.Add(NewPage)
I tried various comination and permutation of this to create an observer:
hObs = NEW Observer(NewPage.parent) AS "tabstrip"
and then created a subroutine:
PUBLIC SUB tabstrip_menu()
PRINT "I'm being clicked"
STOP EVENT
END SUB
But it dosn't seem to pick up the event.
Thanks in anticipation
Richard
> Regards,
More information about the User
mailing list