You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did this work in a previous version of Visual Studio and/or previous .NET release?
No
Issue description
When you're blind or have very limited vision it's very hard to determine the suitable with for the form.
With the ClientSize property you can easily calculate a suitable width by adding the left and width for the right most control and adding the distance you've used for the left margin.
Steps to reproduce
Create a new WinForms application and open the form.
Add a textbox to the form and set it's Left and Top to 12 and its width to 200.
Calculate the suitable form width by adding the textbox Left and Width and adding its Left once more: 12 + 200 + 12 = 224
Set the form width to 224.
Not quite right.
Diagnostics
No response
The text was updated successfully, but these errors were encountered:
@towebo - is your goal to be able to calculate everything in code, or to facilitate a design time experience for you? We may have other options to accomplish this, or we may be able to add something. The more we understand the specific use-case here the more we can help here.
With the property ClientSize you can be sure that you get the space you want to the right of controls on the form when you design the form in the designer.
Let's say you want to place controls 12 pixels in from the lefft side of the form and you'd like to have the same margin to the right. If you add 12 pixels (left spacing) + 150 pixels (control width) + 12 pixels (right spacing) = 174 pixels and set 174 as the form's width you won't get 12 pixel spacing to the right. This is because the form size include the border.
Environment
VisualStudio.17.Preview/17.11.0-pre.5.0+35118.90
.NET version
8.0
Did this work in a previous version of Visual Studio and/or previous .NET release?
No
Issue description
When you're blind or have very limited vision it's very hard to determine the suitable with for the form.
With the ClientSize property you can easily calculate a suitable width by adding the left and width for the right most control and adding the distance you've used for the left margin.
Steps to reproduce
Not quite right.
Diagnostics
No response
The text was updated successfully, but these errors were encountered: