Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: Anchors do not work when windowstate = 2
Message
From
30/09/2004 05:58:16
 
 
To
30/09/2004 05:13:33
Eyvind W. Axelsen
Profdoc Norge As
Oslo, Norway
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00947437
Message ID:
00947446
Views:
15
>When a form with anchored controls is shown Maximized, the controls are not resiszed correctly. Repro code below:
>
>Local loForm As Form
>loForm = CreateObject("Testform2")
>loForm.WindowState = 2
>loForm.Show()
>Wait window 'Observe that the edit box is not resized'
>
>DEFINE CLASS testform2 AS form
>
>
> DoCreate = .T.
> Caption = "Form"
> Name = "testform2"
>
>
> ADD OBJECT edit1 AS editbox WITH ;
> Anchor = 15, ;
> Height = 216, ;
> Left = 36, ;
> Top = 12, ;
> Width = 300, ;
> Name = "Edit1"
>
>
>ENDDEFINE

This is not a issue relative to Anchor or WindowState behaviours.
When a form is Visible = .F., the Resize event is not fired,
and then the Anchor is not fired too.
public loForm As Form
loForm = CreateObject("Testform2")
*loForm.WindowState = 2
loForm.width = loForm.width*2
loForm.Show()
Wait window 'Observe that the edit box is not resized'
loForm.WindowState = 2
Wait window 'Observe that the edit box is resized'

loForm.visible = .F.
loForm.WindowState = 0
loForm.visible = .T.
Wait window 'Observe that the edit box is not resized'
* Now, how i can fire a Resize Event without change the form size ?

* a terrible workaround:
loForm.LockScreen = .T.
loForm.height = m.loForm.height+1
loForm.height = m.loForm.height-1
loForm.LockScreen = .F.
Wait window 'Observe that the edit box is resized'

DEFINE CLASS testform2 AS form

DoCreate = .T.
Caption = "Form"
Name = "testform2"

ADD OBJECT edit1 AS editbox WITH ;
Anchor = 15, ;
Height = 216, ;
Left = 36, ;
Top = 12, ;
Width = 300, ;
Name = "Edit1"

PROCEDURE unload
	RELEASE loForm

ENDDEFINE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform