Subject Re: MENU TITLE in a FORM
From Mustansir Ghor <mustan31@hotmail.com>
Date Mon, 19 Mar 2018 16:00:15 -0400
Newsgroups dbase.getting-started

Dear Andy

Thank you. Indeed this is very helpful tip.

But learning never ends.

There are other ways to do it that involve keeping form objects and their contents visible to other forms but the programming effort is much more complex.

Since i have couple of forms that interacts with other forms so if I can learn from you programming on this subject that it may prove to fruitful.

Regards
Mustansir


Andy Taylor Wrote:

> Mustansir,
>
> The following two methods spring to mind:
>
> Method 1
> Use the following onClick code:
> onClick = {;do opd.wfm with true, this.text}
>
> and before the bootstrap code in opd.wfm put:
>
> parameter bModal, cText
> local f
> f = new OpdForm()
> f.text = cText
> if (bModal)
>    f.mdi = false // ensure not MDI
>    f.readModal()
> else
>    f.open()
> endif
>
> Method 2 (no need to amend the bootstrap code)
> onClick = {;_app.MyText=this.text; do opd.wfm with true}
>
> include within the onOpen method of opd.wfm
> form.text = _app.MyText
>
> I think I prefer method 2 as it is simple.
> There are other ways to do it that involve keeping form objects and their contents visible to other forms
> but the programming effort is much more complex.
>
> Regards,
> Andy
>
> > Dear Andy
> >
> > Thank. I could see ROOT.
> >
> > I have following code in a menufile which is attached to form. There is an object  this.MNSERVICES.MOPDS whose onclick event open another form opd.wfm. I wish to display in this (opd.wfm) form.text , this.MNSERVICES.MOPDS.text
> >
> > How this can be done.
> >
> > Best Regards
> > Mustansir
> >
> >
> >
> > ** END HEADER -- do not remove this line
> > //
> > // Generated on 18/03/18
> > //
> > parameter formObj
> > new OPDMENU(formObj, "root")
> >
> > class OPDMENU(formObj, name) of MENUBAR(formObj, name)
> >    this.MNSERVICES = new MENU(this)
> >    with (this.MNSERVICES)
> >       text = "Services    "
> >    endwith
> >
> >    this.MNSERVICES.MOPDS = new MENU(this.MNSERVICES)
> >    with (this.MNSERVICES.MOPDS)
> >       onClick = {;do opd.wfm with true}
> >       text = "OPD Service"
> >    endwith
> >
> > endclass
> >
> >
> > Mustansir Ghor Wrote:
> >
> > > Dear All
> > >
> > > I have a form that opens from a menu. I have put code block in the onclick event of menu do xyz.wfm with true.
> > >
> > > How to access menu object inside the form  that opened a form as per above event.
> > >
> > > Best Regards
> > > Mustansir
> >
>