Re: urgent: help required, vs.net 2008

HI tried just selecting them all and including them in one fell swoop. If they do not all come through properly as attachments I will send each seperatly or zip them up and send the folder they are in. I have CCed myself a copy and will also check the list version that comes through. Here are the Tutorials:

Rick USA
----- Original Message ----- From: "Homme, James" <james.homme@xxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, March 24, 2010 7:06 AM
Subject: RE: urgent: help required, vs.net 2008


Hi Rick,
Where is your tutorial?

Jim

Jim Homme,
Usability Services,
Phone: 412-544-1810
Skype: jim.homme
Internal recipients, Read my accessibility blog. Discuss accessibility here.

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of RicksPlace
Sent: Wednesday, March 24, 2010 5:43 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: urgent: help required, vs.net 2008


Hi:
First, Brent, have you read my tutorials on the subject of positioning
Winforms controls manually and using the Layout Table control?
As for VS 2008 accessibility, it is almost identical to VS 2005 from an
accessibility standpoint. I use Windoweyes and have found work-arounds for
anything that was not particularly accessible under that IDE. Like VS 2005
it depends on the settings in the Options Menu Tree under the Tools menu bar
that determine how the IDE will act with a screen reader. If you are
familiar with 2005 you should have no problems with 2008 in my opinion. I
can not speek to the JAWS scripts since I do not use them.
Working in VB.net, VWD  and Sql Server are what I do mostely and use most of
the built-in UI controls, Data and Formatting Wizards and even some of the
Designers with no problems.
I have used the various Tool Bar controls in VB.net, mentioned in the other
post, The Table Designer for my Databases and advanced XSD and Configuration
processing, and, well if you have other questions just ask since there are
over 1,000 diferent windows and what not in the IDE providing many, many
development functions.
Rick USA
----- Original Message -----
From: "Brent Harding" <bharding@xxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, March 23, 2010 10:30 PM
Subject: Re: urgent: help required, vs.net 2008


Are there good blind-friendly tutorials out there for it like there were
in the days of 2003? I know that when I was in a training program for the
blind, this computer guy thought it might be fun, and he was kind of
right, to play with that old tutorial on making a menu bar, maybe it did
one other little thing, but things aren't at all the same any more trying
to follow any of that old stuff. I tried following it with 05 express
since I didn't have 2003 like that school did, not only did the scripts
not work real well, everything's different about it. Is this a good
language to start with, assuming I don't really want to deal with bogging
my machine down with virtual machines and Orca with crappy sound that
locks up in them a lot? I never got the whole pixel coordinate thing how
much space each thing takes up, maybe there's an automatic mode by now?

Finally, will I mess up my system uninstalling 2005 and grabbing 08?

----- Original Message -----
From: "sameer manohtra" <sameermanohtra@xxxxxxxxx>
To: "programmingblind" <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, March 23, 2010 8:26 PM
Subject: urgent: help required, vs.net 2008


hey everyone,
writing here after long, hope you all are in great wellbeings.

folks, due to some reasons, i'd have to upgrade to vs.net 2008 now.
i have been successfully working with c# and vb.net 2005, but due to
some compulsions i'd have to switch it to vs.net 2008.
i have never worked with it before, those who have worked, are
requested to kindly guide me, if it is accessible or not?
can i independently work on it like 2005?
what are the things which are different in terms of accessibility?
do we have any jaws script for the vs.net 2008?

whatever else that one should take care while switching it, and
working with vs.net 2008.
 kindly tell me, i'll be greatful.

an early response is highly appreciated, kindly help this novis.

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



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



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


This e-mail and any attachments to it are confidential and are intended solely for use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this e-mail without the author's prior permission. The views expressed in this e-mail message do not necessarily represent the views of Highmark Inc., its subsidiaries, or affiliates.
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind

Step 01: Create the Form:
Start a new project in Visual Studio or one of the Express Modules, I will be 
using Vb.net in Visual Studio 2005.
Project Name: FormsLayout
Project contents by default are MyProject Folder and the Form1.vb object.
Right MouseClick on Form1.vb, select view Forms Designer and Designer comes up.
Under View Menu select Properties Window or hit the w key to bring up the 
properties Window for this form.
Arrow down the list of properties and set:
Backcolor = Black:
Continue arrowing down the list of properties.
When you get to font:
tab twice to the Elipsis, 3 decimal points ...,  Windoweyes calls it quote 
browse unquote ,  and hit enter:
The Font Dialog comes up. Tab once past the Style combo box to the size combo 
box and arrow down to 12 to set the font size to 12 pt.
Tab to the OK button and hit enter to return to the Properties Window list of 
properties for this form.
Arrow down to Forecolor and either select or type in white.
Arrow Down to size and set it to 1000, 700
Continue arrowing down to Start Position and tab to Browse, hit enter and 
select Center Screen and hit enter.
You are returned to the Properties Window list of properties for the form.
Hit CTL+F4 to exit the properties window and return to the Forms Designer for 
this form.
Hit CTL+F4 again and answer yes to the prompt to save the changes.
Hit Alt+F4 to exit project if you want and answer yes to save prompt.
At this point:
We have a project called FormsLayout:
It has one Form called Form1.vb.
If we hit ctl+f5 to run the project a centered black rectangle would basically 
fill the screen. This is our form. It has no controls on it so it just looks 
like the screen has turned black except for a little space around the edges and 
a line along the top that might say something like Form1 which is the  TitleBar.
We will add and position our controls inside this black box in subsequent steps.
FormsLayout: Step02: Concepts and Math:
So far we defined our form, Form1.vb to have a size of 1000 by 700. This means 
that it consists of 100 dots  horzontally by 700 dots vertically. Of course the 
dots are all filled in so it looks like a solid box to a visual person but each 
dot called a pixel is one point on the form. Each pixel has a location on the 
form called an address. Each address has an x and y coordinate. The x 
coordinate tells you how many pixels from the left the dot is and the y 
coordinate tells you how far from the top the dot is. The x and y coordinates 
are relative to the  position of the first dot in the upper left corner which 
has an x,y coordinate position, of 0,0.
Thus a pixal located half way across our form and half way down would have a 
position of 500, 350. 500 is half of the 1000 pixels we specified in the 
horzontal size property for form1 in step 1; And, 350 is half the number of 
pixels we specified for our verticle size in step 1.
Thus the point, pixel located at 500, 350 is pretty much in the dead middle of 
our Form.
Things like TextBoxes, Buttons and other controls are small rectangular boxes we can put on our form so long as we make sure they all fit inside the form which is the black background of 1000 pixels horzontally by 700 pixels vertically and the little boxes do not overlap each other. An Example:
We might look at a TextBox. This is a small box you can have some text 
displayed in or you can type into. It has a fixed position and size. Perhaps we 
want a Login Control on form1 and our first TextBox will be a place to enter 
your UserName. There will be a second TextBox where you can enter your 
Password. Now, envision the entire screen is black. We want 2 small white boxes 
 positioned someplace on this big black background where we can type in our 
UserName in the first box and our Password in the second box.   We need to 
arrange the two boxes somehow. We can put one on top of the other with a little 
space between them or we can put them side by side with a little space between 
them. The space between the two white boxes will appear as a black strip since 
our background color for the form is black and this is nice. Let's put our two 
controls side by side at first. We will have a TextBox to enter a UserName, 
some black space and another white TextBox to the right of it where we can 
enter a Password.
So, we will have to know where to start the UserName TextBox and whare to start the Password TextBox so it does not overlap the UserName TextBox. That means we need to know the leftmost position of the UserNameTextBox and add the length of the box to find the right edge of the box. The Password TextBox will have to be positioned to the right of that point or the Password TextBox would overlap the UserName TextBox. Look at the following example: tbUserName Position = 200, 50
Size = 100, 26
This says the left edge of our UserName box is 200 pixels from the left of our 
form and the top edge 50 pixels from the top of the form. It is 100 pixels long 
and 26 pixels high. That means the white box starts at horzontal position 200 
and ends at position 299 since it is 100 pixels long and we add the length of 
100 to the start position of 200 to get the end position subtracting 1 because 
the length is inclusive of the start point.  Therefore, our Password TextBox 
will have to start at some point beyond 299 or it will overlap the UserName 
TextBox. If you started the Password TextBox at 300 from the left of the form 
the two boxes would appear as one long white rectangle because there would be 
no spaces between the end of the UserName box and the beginning of the Password 
box. So we will start our Password box a little further to the right so there 
will be some black background between the 2 boxes.
So let's start the Password TextBox at 350, 50. That way we have both boxes 50 pixels from the top of the form so they lign up horzontally. The UserName box will be to the left of the Password box seperated by about 50 pixels of black background.
The property settings for this senario:
tbUserName:
Position 100, 50
Size 100, 26
tbPassword
Position 350, 50
Size 100, 26
The above should do the trick nicely. Now, our boss says he wants the Password box ligned up directly under the UserName box, sigh, sure boss!
The white UserName TextBox starts 200 pixels from the left of the form and 50 
pixels from the top.
It is 26 pixels high.
So the Password TextBox will start 200 pixels from the left of the form to lign 
up it's left edge with the UserName TextBox left edge.
We then find the bottom edge of the tbUserName control by adding the height, 
26, to the vertical start position of the top edge which we set to 50. So 50 + 
26 = 76 and our tbUserName box has a top edge at vertical position 50 and it's 
bottom edge vertical position at 50 + 26 - 1 or 75.
We want our Password TextBox to start below the lower edge of the UserName box 
so need to have a vertical start position below 75. If we leave 50 pixels of 
black background between the 2 boxes, we can start the Password TextBox Top 
Edge at 125 which is just 75 + 50.
The property settings for this senario:
tbUserName:
Position 100, 50
Size 100, 26
tbPassword
Position 200, 125
Size 100, 26
The above should do the trick.
In General: The Location of the left edg of a control is the x coordinate of the Position Property. The location of the top edge is the y coordinate.
To get the right edge of the control just add the length to the x coordinate 
and subtract 1. To get the bottom edge just add the height to the y coordinate 
and subtract 1. The length and height are specified in the Size property for 
any control.
The absolute position is fudgable. You can not see one or 2 pixels in most 
senarios so 124 will look like 125 or 126 to a sighted person so use your own 
discression if working with numbers,. I like to keep things ending in 5 or 0 
for ease of mental calculations but you can do it down to the exact pixel 
anytime and be right on a given position.

To see this manual positioning approach in action we will add and position some 
controls on our Form1.vb object in the next step.
FormsLayout:Step03:ManualPositioning
Now we have a project FormsLayout and a form called Form1.vb. It is currently a black background we will be working on.
It's Property settings:
Name is Form1
Size = 1000, 700
BackgroundColor = Black
ForegroundColor = White
StartPosition = Center Screen.
Let's set up our Login example from Step02.
Before we start, Microsoft will often set default height values for controls like TextBoxes and Labels. Your values might not be exactly the same as mine so just keep it in mind when reading this. If you see a calculation where a TextBox height is 26 here and your TextBox is 24 then just use 24 in place of 26 when doing the calculations below. A couple of pixels does not matter so long as you have enough blank space between controls so they will not overlap and sighted folks can't see less than a couple of pixels on most screens anyway. We will put the UserName box on top and the Password box below it with both boxes left edges aligned 200 pixels from the left of the form. Open the project and right mouse click the Form1.vb object and start the Forms Designer. Under the View Menu bring up the ToolBox, Drop a TextBox on the form.
Set it's properties:
Name = tbUserName
BackgroundColor: White
ForegroundColor: Black
Location = 200, 50
Size = 100, 26 Note the height will likely automatically be set by MS based on the Font Size you specified for the Form in Step01: leave it to whatever the default is for now. TabIndex: 0
TabStop: True
Hit Ctrl+f4 to exit the Properties for this control.
Now, under the View Menu drop another TextBox on the form and set the properties:
Name = tbPassword
BackgroundColor: White
ForegroundColor: Black
Location = 200, 125
PasswordChar: *
Size = 100, 24
TabIndex: 1
TabStop: True
UseSystemPasswordChar: True
Here we aligned the left edge of the tbPassword box 200 pixels from the left of the form to match the left edge of the tbUserName which is also 200.
Find the position of the bottom edge of the tbUserName box:
50, top edge, + 26, height,- 1  = 75
The Top Edge of the tbUserName TextBox is at position 50 and bottom edge is at position 75. I can set the Top Edge of the tbPassword TextBox at any point below 75 and it will not overlap the tbUserName TextBox. I just pick 50 pixels of blank space, just black background, and add that to the bottom edge position of 75.
75 + 50 = 125.
I can start the tbPassword TextBox at 200, 125 and it will appear aligned right under the tbUserName TextBox with about 50 pixels of black background seperating the 2 vertically aligned boxes.
Now, lets drop a Button on the form:
Set Properties:
Name btnLogin
BackgroundColor: Gray
ForegroundColor: Navy
Location: 200, 200
Size: Leave whatever the defaults are, mine are about 75, 23.
TabIndex: 2
TabStop: True
Text: Login Here we put a button below the Password TextBox and aligned it with the left edge of the 2 TextBoxes so it looks like it belongs with them. The Left edge is 200 pixels from the left of the form as are the 2 login boxes. I just ball parked 50 pixels below the bottom edge of the tbPassword control which was at 125 + 26 - 1or about 150, added about 50 pixels of black background spacing to come up with a top edg position for my button of about 200. That is 150 + 50 is 200. Now, our form is a black background with 2 white boxes in the upper left quadrant of the form and a button below them saying Login. Lets put a Message Box someplace on the form. We know we have a form with some login controls in the upper left quadrant of the form extending from 200 pixels on the left to about 300 on the right and from about 50 pixels from the top to about 325 pixels from the top. This is pretty much the upper left quadrant of our form. So, we can put a message box right of this quadrant or below it without crowding the form. Assuming I want a big message box I decide a big box in the upper right quadrant of the form filling pretty much the upper right quadrant of the form would look good. I would have the 3 Login Controls in the upper left quarter of the form and a box about the same height as all three Login controls combined to the right of them in the upper right. To do this I will start the Message Box 50 pixels from the top of the form to match the top edge of the tbUserName Control. I will set the left edge of the tbMessages box at the horizontal midpoint at 500 pixels from the left. So my location would be 500, 50. This is fine since our Login Controls end points, right edges do not extend beyond 300 pixels horizontally - no overlapping. Since this box might hold allot of words I will extend the tbMessages from the midpoint right to about 10 pixels from the right edge of the form which is at 1000, actually 999 but who is counting. So I calculate the length of the box as 999 - 500 - 10 or about 489 pixels long which I round to 490 because I like round numbers and one pixel will not impact anything functionally, will not risk going past the end of the form at 999 nor will it look any diferent to a sighted person. Also I want it's height to extend down about as far as the bottom of the Button Control which is at about vertical position 225, based on a default MS button height of about 25. The tbMessages control's height will be 225 - 50 = 175. That is the Lower Edge Position of 225 less the top edge position of 50.
So drop another TextBox on the Forms Designer.
set it's properties:
Name: tbMessages
BackgroundColor: White
ForegroundColor: Black
Location: 500, 50.
Size: 490, 175
MultiLine: True
TabStop: True
Hit ctrl+f4 to close Properties window and ctrl+f4 to close Forms Designer answer yes to any request to save changes. We now have the top half of our form holding controls. We have some space, 200 pixels to the left of the Login control set we can use if we want and have the entire bottom of the form available for more controls. You can hit ctrl+f5 to test the Project and tab around the various controls. Notice that the TextBoxes do not tell you what they are suppose to hold.So tabbing around just reads something like EditBox,EditBox, Login Button, EditBox. This is not good for a sighted person nor a Screen Reader User. What to type where? So we need to somehow convey what to type into our TextBoxes or, if necessary, what the TextBox might be holding. To Do this We can use Label Controls positioned either to the left of another control or just over it. This way our Screen Reader will read it in conjunction with the word EditBox so if we put a label control just left or over the tbPassword control and set it's text property to quote Password Unquote a sighted person would see the word Password: followed by a little blank space and a TextBox just right of the word where she can enter a Password. If we put the Label just over the tbPassword control the result would be the word Password directly over the TextBox where the user should enter her password. In either case a screen reader should have the cursor stop in the TextBox but read the label for that TextBox so if you tab to the Password TextBox you would hear Password EditBox and your cursor will be positioned inside the TextBox ready for you to type your password. So let's add 3 labels to denote what is to be entered in our 3 TextBoxes.
Bring up the Forms Designer:
Drop a Label Control on the Form.
Properties:
Name: lblUserName
Backcolor: Black
ForeColor: White
Location: 100, 50
Size: Use MS Default, mine is 85, 20
TabIndex 0
Text: UserName
Drop a second label control on the form:
Properties:
Name: lblPassword
BackColor: Black
ForeColor: white
Text: Password
Location: 100, 125
TabIndex: 1
Size: 78, 20 MS Default after I entered the Text Property.
Exit the Forms Designer saving your work and run the project.
Tabbing I now hear EditBox UserName, EditBox Password, Login Button and WTF? EditBox UserName instead of just EditBox for our tbMessage Box Control that has no label yet. This is because Windoweyes is looking for a label control or literal to associate with that EditBox. The last one and the only one on the same horizontal line is the label control for the tbUserName control so it guesses wrong and we hear the wrong label read for the tbMessages TextBox, sigh it's harder than I thought to just get it to read nicely. So I will try adding a label control just over the tbMessages control and setting that labels TabIndex to the same as the tbMessages control to see if that works. I will actually start the label control a few pixels to the left of the tbMessages control to help Windoweyes guess that I want this control read with the tbMessages TextBox if it can't figure it out using the TabIndex. Windoweyes will read any control left or over another control as perhaps a label for the control just right or just under it so I'm doing both here just to touch all bases.
So:
In Forms Designer Drop another label control on the Form:
Set Properties:
Name: lblMessages
Location: 498, 25
Size:82, 20 MS Default Size
Text: Messages TabIndex: 3
Now Ctrl+f4 and save your work.
Ctrl+f5 to run the project and the form now reads correctly when you tab around the form. Getting a Form to read correctly with a Screen Reader is a little Art and a little Math. If something does not work keep basic principles in mind and experiment until you get a good reading on a form.
Now we have our form looking ok and reading well.
I know that 50 pixels is almost 10 percent of the Forms height and 5 percent of it's width. I think 50 pixels of vertical blank space is a bunch of blank space between my Password controls. In fact the controls are only about 25 pixels high so 50 pixels is twice as much blank space as the boxes and button are high. To make them look more like a group I will ReCalculate their positions so there is only about 20 pixels between them vertically. That means the blank space will be less significant visually to a sighted person than the white space or text in our textboxes and mentally the 3 login controls will appear more related. This is just some psychology, bigger and bolder gets our attention. Thus the 2 login boxes and button will present a larger white area at a quick glance of the form and the smaller spaces seperating them will be less significant so the Login group will command attention as a group of controls. You can also put them inside a Container Control with a border but that is not part of Positioning so our visual spacing plan will accomplish the same thing without a pretty border or clutter of a nasty border depending on your point of view. So, we need to adjust the Vertical position of the following controls to make this happen:
lblUserName, tbUserName Leave these controls alone.
lblPassword, tbPassword
First subtract 30 pixels from the tbPassword control:
125 - 30 = 95
So the new top edge of our lblPassword and tbPassword controls will be changed to 95. The new bottom edge of the tbPassword will be 95 + 26 - 1= 120. Now add 20 pixels of blank space below the bottom edge to seperate it from the button and the top edge of the button is at: 120 + 20 = 140. So the new button location is: 200, 140.
Now the new Location properties should be:
lblUserName: Location: 100, 50
tbUserName: Location: 200, 50
lblPassword: 100, 95
tbPassword: 200, 95
btnLogin: 200, 140
Note that I just used the same top edge for the lblPassword as the new tbPassword. This is to keep them aligned vertically. Adding the same 20 pixels to the lblPassword would not give the right result as it is not the same height as the tbPassword control. We want to keep the label and text aligned horizontally so just use the same vertical position as the control with the larger height which, in this case, is the tbPassword control. So just calculate the new top position for the tbPassword and use that for it's related lblPassword to keep them aligned nicely. Our form now looks pretty good. Of course it could be much more visually appealing but that is not the object of this series, just positioning. Remember you can group controls by having smaller blank spaces between the entrants of the group and larger spaces between various groups of controls. This works to automatically group controls into an area of the form without drawing a border around the group. When I look at the form I see a group of controls in the upper left quadrant and a big box in the upper right quadrant. I see the group of controls in the upper left quadrant are all related to logging in and my brain confirms this is a group of controls and this area of the form is the area dedicated to logging into our system. Anyway, that is how most people's brains process and group details automatically without them thinking about it. Phew! Next we will look at an easier? method of doing some form layout work. There is a control in the ToolBox, actually a couple, that will help us with positioning controls on a form. It is especially helpful for setting up groups of controls as we did for the set of Login Objects we added to our form already.
This is the end of this Step:
AddWe 
FormsLayout:Step04:TableLayoutPanelOverview
The TableLayoutPanel is a very flexable Control in the ToolBox. It allows you to specify a table consisting of rows and columns. You can then either drop individual controls into a cell of the table from the Forms Designer using the View Menu and ToolBox or add individual controls programatically in your vb code. You can manipulate just about everything about this control from the number and size of rows and columns to automatic expansion, scrolling and a host of other factors such as cell margins and padding. Perhaps I will continue researching this control to see it's real power if it will work with Windoweyes. For now here is a quick overview of how to put a TableLayoutPanel on a form and add some controls to it. Everything is set up in a static fashion to make things easier at first and to ensure minimal problems when working with a Screen Reader like Windoweyes or JAWS. Example Addition to our FormsLayout Project: On Form1.vb I want to be able to enter a Stock Ticker Symbol, click a button and see the Price and Trading Volume for that stock.
To Do this I need:
lblTicker, tbTicker
lblPrice, tbPrice
lblVolume, tbVolume
btnGetQuote
Now, instead of calculating all the start and end positions for all these controls I will just put them into a TableLayoutPanel and let the TableLayoutPanel format the positioning. Drop a TableLayoutPanel on the form: A Dialog Box of sorts will come up where you might add columns and rows. I just hit escape to close it and return to the Forms Designer. Right mouse click the TableLayoutPanel and opened the Properties Window for the control:
Set the following Properties:
Name: tlpStockQuote
ColumnCount: 2
RowCount 4
Location: 100, 400
Size: 800, 125 Just leave default for height as MS calculates it based on rowcount and font size. TabIndex: 4. TabStop: False. BackColor: white ForeColor: black I might play with the colors later but for now I want to see a big white box in the middle of the bottom of the form where I can drop my detail controls and have them formatted by the tlpStockQuotes control. I have the length set to 800 leaving 100 pixels on the left and right of the tlpStockQuotes TableLayoutPanel and it is pretty much centered vertically as well if I just look at it when I hit Ctrl+f5. So it is positioned fine and it's size would seem to be consistent with the rest of the form since MS set the Vertical Height based on the Form Font Size of 12 and we specified 4 rows in the properties window for this container control. I will modify the size and position of the tlpStockQuotes control later if I want to make it a better fit to the content of the controls we will embed in it. A Ticker Symbol is likely less than 10 characters, same with price and volume and the titles we will use in the label controls or text for the button will not be more than 100 pixels so a length of 800 pixels will be overkill. We will mess with all that later. For now let's just put our controls in the TableLayoutPanel to see it at work. So, Open the forms designer and bring up the properties window for tlpStockQuotes. Arrow down the properties to Columns (Collection), tab past theEditBox to the Browse elipsis or button and click it.A sort of Dialog Window comes up for the 2 columns you specified in the Column Count property. It is called the Column Style Dialog. Tab around this window. There is a ComboBox where you can select the content of this cview. Just leave it set to column for now. Next is the description of the column. Mine says Column 1SizeType Percent Value 50.00 %
Tabbing we hear the add delete and Insert buttons
Next we here a radio button and percent is checked. Arrowing back and forth There are 3 choices, percent, absolute and AutoSize. I will set it to Absolute, tab to the value box which now says 20 and set my cell length to 150. This will allow a textbox or button of 100 and 50 pixels blank space between controls horizontally.. Next tab reads the Spanning option which I will ignore for now. Next are the ok and cancel buttons but I will not do them yet. I tab past the ComBo Box to the list view and arrow down to column 2.Again it's style is percent so I tab to the radio button, select absolute and set it's size value to 150 as we did above.Then I tab to OK and hit enter and am returned to the Properties window for the tlpStockQuote Control. Arrow Down to the Rows (Collection) property, tab twice to the browse dialog elipse and hit enter. A window very similar to the Column Style Window comes up. Arrow to the Rows ListBox and for all 4 rows set the size to AutoSize. After you have done that tab to the OK Button and hit enter. The TableLayoutPanel will automatically space the 4 rows and put any controls we drop into it in a cell and align them vertically.
Dropping controls into the table.
Here are all the controls and the Property Settings. Drop each new control on top of the previous control and it will be added to the tlpStockQuote in the next cell. Return to the Forms Designer and tab to the tlpStockQuote control. Drop a Label Control on the tlpStockQuote control, right mouse click the label control to bring up the Properties Window:
Set The Following:
Name: lblTicker
BackColor: White
Cell 0, 0 - Cell 0, Row 0
ForeColor: Black
Location: Mine says 3, 0, leave alone. Arrow down to the Text Property and enter the word Ticker and arrow back up to the size property to see how MS changed it. MS changed it to 51, 20 in my case which is fine since my cell length is 150. Hit ctrl+f4 to return to the Forms Designer. Drop a TextBox Control on top of the lblTicker Control and it is added to the next cell in tlpStockQuote.
Set the TextBox Properties:
Name: tbTicker
BackColor: Black
Cell: 1, 0 - cell 1, row 0
ForeColor: white Location: 153, 3
Size: 100, 26 Leave default height.
Ctrl+f4 to return to Forms Designer.
Drop another label control on the tbTicker Control to add to next cell.
set:
Name: lblPrice
BackColor: White
Cell 0, 1
ForeColor: Black
Location: 3, 32
I arrow down to text property and enter price arrow up to size and see 44, 20
TabIndex: 2
Ctrl+f4 to return to Designer.
Drop a TextBox on the lblPrice control to add to next cell.
Name: tbPrice
BackColor: Black
Cell: 1, 1
ForeColor: White
Location: 153, 35
Size 100, 26
TabIndex 3
TabStop true
Ctrl+F4 to return to Designer:
Drop a Label Control On tbPrice.
Set:
Name: lblVolume
BackColor: White
Cell: 0,2
ForeColor: Black
Location: 3, 64
Text: Volume
Size: 63, 20
TabIndex: 4
Ctr+F4 to return to Designer.
Drop a TextBox on lblVolume.
Set:
Name tbVolume
BackColor: Black
Cell: 1,2
ForeColor: white
Location: 153, 67
Size: 100, 26
TabIndex: 5
TabStop: True
Ctrl+F4 to Return to Designer.
Drop a Button on the tbVolum Control:
Set:
Name: btnGetQuote
Text: GetQuote
BackColor: Gray
Cell: 0, 3
ForeColor:  Navy
Location: 3, 99
Size: 75, 23
TabIndex: 6
TabStop: TrueYou can see how MS allocates the Location of each control relative to the TableLayoutPanel and not the Form1.vb controls. Even the TabIndex is set relative to the TableLayoutPanel because we want to access things inside this control relative to each other regardless of how the rest of the Form might change over time. Only the properties of the TableLayoutPanel itself are relative to the Form1.vb so you could move the TableLayoutPanel around without changing any of the controls embedded inside it which is nice. So that is the really, really, basic overview of this control. A much more in-depth examination of it's properties might open up some outstanding possibilities judging from the properties available for this control. I might start doing experimentation and research about this control to determine and document some of it's powerful properties but for now I'll leave it as is without ReSizing or making it more appealing visually.
End Of Overview

Other related posts: