I'm trying to pop up a shortcut menu. Should me a simple task, except that
I can't seem to get it to popup where I want it.
I have a button on a toolbar that calls the code below. if theres a form
up, then the menu is in the wrong place. and I
DO have the IN SCREEN
clause. So the menu location should not be influenced by the form.
The menu should pop up at the lower left corner of the toolbar button, regardless
of where the toolbar is. If there is no form open, all works ok, but with a form
open, it comes up in the wrong place.
Here's the code:
LPARAMETERS oMenuObj
LOCAL oMenuObj, nBar, cPrompt
WITH This
nRow = MROW() + 1
nCol = MCOL() - 7.5
DEFINE POPUP ShortCuts FROM nRow, nCol IN SCREEN SHORTCUT
FOR nBar = 1 TO ALEN(.aMenuInfo, 1)
cPrompt = .aMenuInfo[nBar, 1]
cPicture = .aMenuInfo[nBar, 2]
IF EMPTY(cPrompt)
DEFINE BAR nBar OF ShortCuts PROMPT "\-"
ELSE
DEFINE BAR nBar OF ShortCuts PROMPT cPrompt PICTURE cPicture
ENDIF
ENDFOR
ON SELECTION POPUP ShortCuts oMenuObj.MenuSelect()
ACTIVATE POPUP ShortCuts
ENDWITH
RETURN
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people