Re: Tips on laying out forms using Visual Studio 2008

  • From: "Chris Hallsworth" <christopherhallsworth71@xxxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Sun, 12 Oct 2008 11:43:26 +0100

Sure Rick, not a problem. The Table Layout Panel is a fantastic way to layout Winforms it would seem, so I'll carry on playing around.


--
Chris Hallsworth
e-mail: christopherhallsworth71@xxxxxxxxxxxxxx
msn: ch9675@xxxxxxxxxxx
skype: chrishallsworth7266
klango: chrishallsworth
----- Original Message ----- From: "Ricks Place" <OFBGMail@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Sunday, October 12, 2008 11:23 AM
Subject: Re: Tips on laying out forms using Visual Studio 2008


Hi Chris, just do not have time to do that, Marv had the same request and I could not create projects and work with them with him either just now. If you hafve any problems just pop up a question and I'll see if I can help out. Perhaps one day I will set up a single project for doing anything with that everyone can download and then have a common base to work with for everything and anything to do with Winforms or VWD Projects. A sort of ongoing Project we can use whenever asking questions that get beyond what we can handle without seeing the project itself. That or perhaps use something where We can view each others machines so we can see what we are doing while working on a project. I think the former is more likely knowing the limitations of screen readers and security problems sharing files though. Also, using a digital free phone connection would help allot such as skype. All this is on hold for me for now, my retirement money is all in the stock market and I am not feeling very well these days, my wife is worried and I'm not even sure if I will have the money to keep up programming if things do not turn around soon. So, anyway, pop up questions and I will help if I can but no projects for now please, just can't handle it with working on my own projects and everything else,sorry.
Rick USA

----- Original Message ----- From: "Chris Hallsworth" <christopherhallsworth71@xxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Saturday, October 11, 2008 2:28 PM
Subject: Re: Tips on laying out forms using Visual Studio 2008


Yeah! I like the Table Layout Panel. If you have Visual Studio, I can send you the solution file off list then you can give me some helpers? This would be greatly appreciated. Thanks in advance!

--
Chris Hallsworth
e-mail: christopherhallsworth71@xxxxxxxxxxxxxx
msn: ch9675@xxxxxxxxxxx
skype: chrishallsworth7266
klango: chrishallsworth
----- Original Message ----- From: "Ricks Place" <OFBGMail@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, October 08, 2008 10:08 AM
Subject: Re: Tips on laying out forms using Visual Studio 2008


Hi Chris:
There are several ways to layout a form. Let me give you the 5000 ffoot view first. When you create a winforms project in vb.net or CSharp you will see a few files in the project when you look at the Solution Explorer window. One of them is usually called Form1. This, of course, is a default form automatically supplied by the Visual Studio IDE. If you right mouse click it you can bring up the Forms Designer. That is a graphical window where you can drop controls on your form1. The You do this by going to the View Menu Option and bringing up the Tool Box, arrowing down to a control like a Label or TextBox and hitting enter on it. That control is then dropped on Form1. You do this for any controls you want on the form. Now, the form1, any label or TextBox controls have properties such as font type and font size, foreground color, background color size and position. You can modify many characteristics of a form such as Form1 or controls you have dropped on the formin the Properties Window for each item by either tabbing in the forms Designer to a control or the form itself and then selecting Properties Window from the View Menu. You can also right mouse click any control and select the Properties option from a pull down menu to get there. In the Properties Window you can manually set the size and location of the form and any controls you dropped on it. This is the method I use. You can also move controls around directly in the Forms Designer by dragging them around. You can make them bigger, smaller as well. This is something that you can do using JAWS, I use Windoweyes so do not have that option available to me. In either case any changes you make will be reflected on the Forms Designer and in the Properties Window for the Form1 and for any controls you Drop on Form1. To layout a form you think of the Form, Form1, as a big rectangle, a canvas where you will arrange all your controls like labels and TextBoxes. You might want a label just over top a TextBox so they read as one. If you have the text property of a Label Control set to Enter Your Name and put a TextBox just under it when you tab around the form and land on the TextBox your screen reader would say something like TextBox, Enter Your Name. You can also put the label to the left of the TextBox to achieve the same outcome. As you asked, if you just drop controls on a form in the Forms Designer you end up with controls overlapping each other which is not good. You can the position of each control on the form by setting it's location in (DistanceFromLeftOfForm, DistanceFromTopOfForm) format in the Properties Window for that control. This can get messy trying to calculate the size and position for every control on a form so there are a couple of tools in the Tool Box that make it a little easier. The TableLayoutPanel is a table on which you can drop controls and it automatically puts them in columns and rows so you do not have to worry about alligning the controls by calculating positions for every control. If you want a Label Control Just OverTop A TextBox you would just drop your Label and TextBox controls on top of the TableLayoutPanel control you first dropped on the form. Then you can right mouse click, or tab to the label and TextBox controls, bring up the Properties Window for each control and set the cell coordinates. If you put the Label Control in Column 0 Row 0 and put the TextBox in Column 0 Row 1 the label will automatically be sized and placed just over the TextBox when the form is displayed. If you do label at column 0, Row 0 and TextBox at column 1, Row 0 the label will be just left of the TextBox. Both will look good to a sighted person and read well with a screen reader. I have not used the Flow Control but that control will just put any controls you drop on it to the right or left, above or below the last control you dropped on the Flow Control. You decide how you want it to work by setting the Flow Control's properties. So, You view a form as a big rectangle. You drop controls on it and arrange them either using the Properties Window for each control, by using a TableLayoutPanel to automatically layout your form to some degree, or a Flow Panel which I have not used. This is the 5000 foot view. Let me know where you want to start. Your form name and a few controls you have on it and I will give some specifics about Manual setting the location or using a TableLayoutPanel if you want to go that root.
Rick USA
----- Original Message ----- From: "Chris Hallsworth" <christopherhallsworth71@xxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, October 07, 2008 4:16 PM
Subject: Tips on laying out forms using Visual Studio 2008


Hi all, I've just created my first programme in the C# language. It's accessible using the keyboard, but I'm not happy with the visual layout as no doubt the controls (a button and two text boxes), as well as the main form, are on top of each other. Does anyone have any tips on improving the visual layout of forms? For example changing the position of the controls? All help would be greatly appreciated. Thanks!

--
Chris Hallsworth
e-mail: christopherhallsworth71@xxxxxxxxxxxxxx
msn: ch9675@xxxxxxxxxxx
skype: chrishallsworth7266
klango: chrishallsworth
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: