Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Right Aligned CheckBoxes moving on a Page?
Message
From
08/07/2002 19:23:37
Steve Buttress
Steve Buttress Software Consulting
Bloomington, California, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00676196
Message ID:
00676402
Views:
17
This message has been marked as the solution to the initial question of the thread.
>Hi - I have some checkboxes on a page in a page frame control that move quite dramatically at design and runtime. It only happens when the Alignment property of the check box is set to "Right" I have tried code in the INIT and REFRESH but no joy - I also noticed that they appear in the right place when the form is shown but when refreshed the checkboxes move to the right!
>Thanks

This problem occurs when the checkbox is set to Right alignment AND Autosize is set to .T. What happens is that the control position is anchored to its Top and Left properties. When the Alignment property is set to Left, the Checkbox itself is a fixed size, and is positioned exactly as it was placed visually in the form designer. When the Alignment is set to Right, the label portion of the control is on the left, and if Autosize is on, it is dynamically resized at run time, the actual width of the control can not be accurately determined at design time.

The way to get it to stay put, when the Alignment property is set to 1 - Right, is to set Autosize = .F. THEN manually set the Width property, even if the default size is correct, and set the left property so that it is where you want it - perhaps aligned with other controls. By setting it manually (the property display becomes Bold), VFP will leave it alone, and all will be well with the world... <s>
Steve Buttress, MCP
ProMatrix MVP - Life
ProSysPlus Developer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform