I am trying to get a popup to show up under a command button when it is
clicked but I am having problems on getting it located without trial and
error and a static number. Any suggestions?????

--
Altman
VFP7 SP1

"No matter how foolproof you make a system, 'fools' can be remarkably
ingenious."

Re: define popup by George

George
Mon Sep 08 20:44:50 CDT 2003

The rightClick event does the positioning for you with no sweat
Check [Menus\Display Shortcut Menus] in Solutions.app

Do Home() + 'samples\solution\solution.app'

"Altman" <NotGiven@SickOfSpam.com> wrote in message
news:%23IrGnFldDHA.3260@TK2MSFTNGP09.phx.gbl...
> I am trying to get a popup to show up under a command button when it is
> clicked but I am having problems on getting it located without trial and
> error and a static number. Any suggestions?????
>
> --
> Altman
> VFP7 SP1
>
> "No matter how foolproof you make a system, 'fools' can be remarkably
> ingenious."
>
>



Re: define popup by Altman

Altman
Tue Sep 09 08:01:34 CDT 2003

Yeah I looked at that and it's pretty close but it positions it based on the
mouse position. I was hoping to position it under the command button


"George Nava" <NavaGeorge@Hotmail.com> wrote in message
news:%23HQ91PndDHA.2732@tk2msftngp13.phx.gbl...
> The rightClick event does the positioning for you with no sweat
> Check [Menus\Display Shortcut Menus] in Solutions.app
>
> Do Home() + 'samples\solution\solution.app'
>
> "Altman" <NotGiven@SickOfSpam.com> wrote in message
> news:%23IrGnFldDHA.3260@TK2MSFTNGP09.phx.gbl...
> > I am trying to get a popup to show up under a command button when it is
> > clicked but I am having problems on getting it located without trial and
> > error and a static number. Any suggestions?????
> >
> > --
> > Altman
> > VFP7 SP1
> >
> > "No matter how foolproof you make a system, 'fools' can be remarkably
> > ingenious."
> >
> >
>
>



Re: define popup by George

George
Tue Sep 09 08:08:45 CDT 2003

Shortcut menus do auto-positioning by themselves like:

DEFINE POPUP yourPopup SHORTCUT RELATIVE FROM MROW(),MCOL()

so i guess MROW() and MCOL() is what you're looking for.

Check your .mpr for this line, if not try regenerating your menu as a =
shortcut menu
It works with click, double, right or whatever event you want to trigger =
them

Btw, call it "Do myPopup With This" where 'this' is the object being =
clicked

"Altman" <NotGiven@SickOfSpam.com> wrote in message =
news:%23IrGnFldDHA.3260@TK2MSFTNGP09.phx.gbl...
> I am trying to get a popup to show up under a command button when it =
is
> clicked but I am having problems on getting it located without trial =
and
> error and a static number. Any suggestions?????
>=20
> --=20
> Altman
> VFP7 SP1
>=20
> "No matter how foolproof you make a system, 'fools' can be remarkably
> ingenious."
>=20
>

Re: define popup by George

George
Tue Sep 09 08:23:54 CDT 2003

Ok, found it
VFP7 run Solutions.app \ New Features in 7 \ Use new style toolbars
VFP8 it is under Toolbars \ Use new style toolbars

btw, that approach looks messy, i guess a better approach would be to =
use OBJTOCLIENT(), button.Left and height to calculate nRow and nCol =
then go:

DEFINE POPUP yourShortcut SHORTCUT FROM nRow,nCol RELATIVE

"Altman" <NotGiven@SickOfSpam.com> wrote in message =
news:eo5MzJtdDHA.656@tk2msftngp13.phx.gbl...
> Yeah I looked at that and it's pretty close but it positions it based =
on the
> mouse position. I was hoping to position it under the command button
>=20
>=20
> "George Nava" <NavaGeorge@Hotmail.com> wrote in message
> news:%23HQ91PndDHA.2732@tk2msftngp13.phx.gbl...
> > The rightClick event does the positioning for you with no sweat
> > Check [Menus\Display Shortcut Menus] in Solutions.app
> >
> > Do Home() + 'samples\solution\solution.app'
> >
> > "Altman" <NotGiven@SickOfSpam.com> wrote in message
> > news:%23IrGnFldDHA.3260@TK2MSFTNGP09.phx.gbl...
> > > I am trying to get a popup to show up under a command button when =
it is
> > > clicked but I am having problems on getting it located without =
trial and
> > > error and a static number. Any suggestions?????
> > >
> > > --=20
> > > Altman
> > > VFP7 SP1
> > >
> > > "No matter how foolproof you make a system, 'fools' can be =
remarkably
> > > ingenious."
> > >
> > >
> >
> >
>=20
>

Re: define popup by George

George
Tue Sep 09 08:49:03 CDT 2003

Ok, this is not the exact relation between pixels and foxels but very =
close:

In button.Click:

nRow =3D ( Objtoclient(This,1)+This.Height ) / 15
nCol =3D ( Objtoclient(This,2) ) / 5
DO yourPopup.mpr With This, nRow, nCol

then in your popup.mpr:

PARAMETERS oSource, nRow, nCol
DEFINE POPUP yourPopup SHORTCUT FROM nRow, nCol


"Altman" <NotGiven@SickOfSpam.com> wrote in message =
news:eo5MzJtdDHA.656@tk2msftngp13.phx.gbl...
> Yeah I looked at that and it's pretty close but it positions it based =
on the
> mouse position. I was hoping to position it under the command button
>=20
>=20
> "George Nava" <NavaGeorge@Hotmail.com> wrote in message
> news:%23HQ91PndDHA.2732@tk2msftngp13.phx.gbl...
> > The rightClick event does the positioning for you with no sweat
> > Check [Menus\Display Shortcut Menus] in Solutions.app
> >
> > Do Home() + 'samples\solution\solution.app'
> >
> > "Altman" <NotGiven@SickOfSpam.com> wrote in message
> > news:%23IrGnFldDHA.3260@TK2MSFTNGP09.phx.gbl...
> > > I am trying to get a popup to show up under a command button when =
it is
> > > clicked but I am having problems on getting it located without =
trial and
> > > error and a static number. Any suggestions?????
> > >
> > > --=20
> > > Altman
> > > VFP7 SP1
> > >
> > > "No matter how foolproof you make a system, 'fools' can be =
remarkably
> > > ingenious."
> > >
> > >
> >
> >
>=20
>

Re: define popup by Altman

Altman
Tue Sep 09 09:13:31 CDT 2003

Wow that works great THANKS SO MUCH

"George Nava" <NavaGeorge@Hotmail.com> wrote in message
news:eaMIjktdDHA.1044@tk2msftngp13.phx.gbl...
Ok, this is not the exact relation between pixels and foxels but very close:

In button.Click:

nRow = ( Objtoclient(This,1)+This.Height ) / 15
nCol = ( Objtoclient(This,2) ) / 5
DO yourPopup.mpr With This, nRow, nCol

then in your popup.mpr:

PARAMETERS oSource, nRow, nCol
DEFINE POPUP yourPopup SHORTCUT FROM nRow, nCol


"Altman" <NotGiven@SickOfSpam.com> wrote in message
news:eo5MzJtdDHA.656@tk2msftngp13.phx.gbl...
> Yeah I looked at that and it's pretty close but it positions it based on
the
> mouse position. I was hoping to position it under the command button
>
>
> "George Nava" <NavaGeorge@Hotmail.com> wrote in message
> news:%23HQ91PndDHA.2732@tk2msftngp13.phx.gbl...
> > The rightClick event does the positioning for you with no sweat
> > Check [Menus\Display Shortcut Menus] in Solutions.app
> >
> > Do Home() + 'samples\solution\solution.app'
> >
> > "Altman" <NotGiven@SickOfSpam.com> wrote in message
> > news:%23IrGnFldDHA.3260@TK2MSFTNGP09.phx.gbl...
> > > I am trying to get a popup to show up under a command button when it
is
> > > clicked but I am having problems on getting it located without trial
and
> > > error and a static number. Any suggestions?????
> > >
> > > --
> > > Altman
> > > VFP7 SP1
> > >
> > > "No matter how foolproof you make a system, 'fools' can be remarkably
> > > ingenious."
> > >
> > >
> >
> >
>
>