Normal Topic Popup Menu Position (Read 607 times)
olddog
Member
*
Offline



Posts: 35
Joined: Jan 19th, 2008
Popup Menu Position
Jan 18th, 2009 at 1:18am
Print Post Print Post  
i have a tabular subform.  want to use popup menu to select data to fill in record.  i used the follow in statement to position it.

PopupSelectPosition(4,@XPos(ThisElement),@YPos(ThisElement))

it showed up in upper right corner.  when i checked the xpos and ypos they are zero.  why and what can i do besides hard coding the position to get the popup menu when i want it?
  

trying to learn a new trick
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Popup Menu Position
Reply #1 - Jan 26th, 2009 at 1:01am
Print Post Print Post  
Where is the programming for this?

If it is in a form trigger, and not an element, then it will not be correct.
You may need to Set the element to make sure you are getting the one with the coordinates that you want.

SetThisElement(element_name)
PopupSelectPosition(4,@XPos(ThisElement),@YPos(ThisElement))
UnSetThisElement()
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Popup Menu Position
Reply #2 - Jan 26th, 2009 at 5:39pm
Print Post Print Post  
olddog wrote on Jan 18th, 2009 at 1:18am:
i have a tabular subform.  want to use popup menu to select data to fill in record.  i used the follow in statement to position it.

PopupSelectPosition(4,@XPos(ThisElement),@YPos(ThisElement))

it showed up in upper right corner.  when i checked the xpos and ypos they are zero.  why and what can i do besides hard coding the position to get the popup menu when i want it?

Yes, this can be a problem when calling it from within a table-view subform. I have had to hard code the position using mode 3 instead. Like this:
PopupSelectPosition(3, 415, 400)
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
olddog
Member
*
Offline



Posts: 35
Joined: Jan 19th, 2008
Re: Popup Menu Position
Reply #3 - Jan 29th, 2009 at 1:32am
Print Post Print Post  
Thanks for the suggestions.

I think I found an ugly work around.  I created an non visible unbound text box on the parent form, aligned with subform.  I save its xpos and ypos to global values.  Then in the subform code I set the popup position with those global values.
  

trying to learn a new trick
Back to top
 
IP Logged