Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Placement of a Popup
Message
De
01/03/2005 17:24:13
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Placement of a Popup
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Divers
Thread ID:
00991788
Message ID:
00991788
Vues:
56
hello everybody.

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!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform