Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG on popup command coordinate
Message
From
01/08/2003 07:29:42
 
 
To
01/08/2003 07:07:27
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00815787
Message ID:
00815794
Views:
8
>Hi,
>
>i have found time for report this old bug.
>
>Code for repro bug:
>
>PUBLIC oform1
>
>oform1=NEWOBJECT("form1")
>oform1.Show
>RETURN
>
>DEFINE CLASS form1 AS form
>
>
>	Top = 0
>	Left = 0
>	Height = 534
>	Width = 688
>	DoCreate = .T.
>	Caption = "Form1"
>	Name = "Form1"
>
>	ADD OBJECT lb1 AS label WITH AutoSize=.t.,top=200,left=100,Caption='Change size and click on form; then move'
>	
>	ADD OBJECT check1 AS checkbox WITH ;
>		Top = 32, ;
>		Left = 37, ;
>		Height = 17, ;
>		Width = 60, ;
>		Caption = "Move", ;
>		Value = .F., ;
>		Name = "Check1"
>
>
>	ADD OBJECT spinner1 AS spinner WITH ;
>		Height = 24, ;
>		KeyboardHighValue = 72, ;
>		KeyboardLowValue = 4, ;
>		Left = 108, ;
>		SpinnerHighValue =  72.00, ;
>		SpinnerLowValue =   4.00, ;
>		Top = 29, ;
>		Width = 121, ;
>		ControlSource = "THISFORM.FONTSIZE", ;
>		Name = "Spinner1"
>
>
>	PROCEDURE MouseMove
>		LPARAMETERS nButton, nShift, nXCoord, nYCoord
>		STORE MCOL() TO nXCoord
>		STORE MROW() TO nYCoord
>		IF ThisForm.Check1.Value AND POPUP('pp_test')
>			MOVE POPUP pp_test TO m.nYCoord,m.nXCoord
>		ELSE
>			DEACTIVATE POPUP pp_test
>			DEFINE POPUP pp_test FROM m.nYCoord,m.nXCoord
>			DEFINE BAR 1 OF pp_test PROMPT 'BUG BUG BUG'
>			ACTIVATE POPUP pp_test NOWAIT
>		ENDIF
>		THISFORM.DRAW()
>	ENDPROC
>
>
>	PROCEDURE Destroy
>		RELEASE POPUPS pp_test
>	ENDPROC
>
>
>ENDDEFINE
>
>
>Run code.
>Move mouse,
>FROM clause on DEFINE POPUP is good,
>if you change form fontSize, it remain good.
>
>Check on CheckBox, this start MOVE POPUP use for popup position.
>Move the mouse.
>You can see a bug on linear trasformation from COL,ROW and x,y pixel
>position of popup.
>Because the coefficien for this trasformation are correlate with
>form font metrics, i suspect this:
>change form font properties, then bug coefficient change.
>
>Yes it is true.
>
>Change FontSize with spinner, click on form for read changes on
>MOVE POPUP ( another bug ? ) and, moving mouse, you can see that the linear transformation is changed.
>
>Then, workaround this bug is not simplex, but need to read form font properties for compute compensation coefficient.
>
>This bug is present from version VFP3.
>
>Exist a simple workaround?
>
>Fabio

Fabio,

Simple workaraound : see message#673296

Not so simple workaround: see message#673692
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform