Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Width adjusts itself - PITA
Message
 
To
08/10/2001 21:31:55
Ken Dibble
Southern Tier Independence Center
Binghamton, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00563613
Message ID:
00566568
Views:
19
Hi Ken,

That's right, a ThisForm.Width = ??? in the .Init had no effect. However, I did solve this problem which I'll repeat FYI:

I left the forms .ScrollBars = Vertical and set the .Height = 1000 which is bigger than required making the scrollbar dissappear. In the .Init I then set the .Height = 500 and .Top = 1 putting the form to the correct size and causing the scrollbar to display. The .Width stayed at 695 and was not adjusted.

The .Height isn't actually needed for the fix, that was just to ensure the top of the form wasn't off the screen.

>Hi Colin,
>
>What you are describing is not necessarily related to either of the links Tracy provided.
>
>This bug has been widely observed though I don't think MS has specifically acknowledged it. I don't think it's limited to cases when the Title Bar is turned off. It does seem to occur more often when controls are positioned close to the edges of a form. The bug seems to be in the Form Designer itself, rather than in the Foxpro engine.
>
>As far as I know, there is no fix that will prevent the form width from changing when you save the form in the Form Designer. If you insert a width=x statement in the form's Init() method, it should definitely cause the form to appear with the correct width at runtime. Are you saying that a width statement in the Init() method has no effect at runtime?
>
>>Hi John,
>>
>>I tried that and it didn't solve the problem. Also, I don't turn off the TitleBar. I'm pretty sure it's related in some way to the bug that Tracy directed me too because the Width is changing when the form is saved.
>>
>>http://support.microsoft.com/support/kb/articles/Q193/7/49.ASP?LN=EN-US&SD=gn&FR=0&qry=%26quot%3Bform%20width%26quot%3B&rnk=165&src=DHCS_MSPSS_gn_SRCH&SPR=FOX
>>
>>
>>>Colin,
>>> I had the same problem. Found out there is a bug in VFP 6.0 if you turn off the Title Bar (TitleBar = 0) it does what you are seeing. I fixed it by simply putting a command in the form init - Thisform.Width = nnn. The init happens last so it works every time even if the titlebar is not your problem.
>>>
>>>>I have a form that has a vertical scrollbar. The forms width is set to 695 but after the form is saved and run the width is changing to 672. Any ideas on how to stop this? TIA
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform