Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Placement of a Popup
Message
 
 
To
01/03/2005 17:24:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00991788
Message ID:
00991823
Views:
10
Did you try
nTargetRow = (OBJTOCLIENT(THIS.Btn1, 1) + THIS.Btn1.HEIGHT)/(_screen.height/srows())
nTargetCol = OBJTOCLIENT(THIS.Btn1, 2)/(_screen.width/scols())
?
>
>as a result of thread #990914 i have writen my own ToolBar class. works great and was a lot less work then i originaly thought. however, i got a problem with the placement for a popup which acts as the dopdown menu for the dropdown button. the popup displays way off from where it supposed to be.
>
>the Btn1 object is located inside a container, which is located inside a container (the toolbar container), which is located in the top/left coordanate of a form.
>
>the following code is a simplyfied version of what i got. i can not change the ScaleMode temporarly, because on the same form is the OutLook ListBar (from the download section) which throughs errors as soon you change the ScaleMode.
>
>Even though, i tryied changing the scale mode anyway, just to see if i would get close, but at no success.
>* *** i can not use scalemode as this interferes with the Outlook ListBar
>* *** (downloadeble in the download section)
>* ***	OldFormScaleUnit = THISFORM.SCALEMODE
>* ***	OldScreenScaleUnit = _SCREEN.SCALEMODE
>* ***	THISFORM.SCALEMODE = 0
>* ***	_SCREEN.SCALEMODE = 0
>
>* ***	THISFORM.SCALEMODE = OldFormScaleUnit
>* ***	_SCREEN.SCALEMODE = OldScreenScaleUnit
>
>* *** seems to returns in pixels
>nTargetRow = OBJTOCLIENT(THIS.Btn1, 1) + THIS.Btn1.HEIGHT
>nTargetCol = OBJTOCLIENT(THIS.Btn1, 2)
>
>* *** for simplizity i've take out the border/titlebar calculation
>
>DEFINE POPUP m_MenuButtons SHORTCUT RELATIVE margin
>*DEFINE POPUP m_MenuButtons SHORTCUT RELATIVE FROM m.nTargetRow, m.nTargetCol
>
>DEFINE BAR m.i OF m_MenuButtons ;
>	PROMPT "Test"
>
>* *** seems to need need foxels
>ACTIVATE POPUP m_MenuButtons at m.nTargetRow, m.nTargetCol
>
>I thank you for all your help in advance!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform