473,382 Members | 1,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Height of Controls

I need to place many controls on the form - Textboxes, DateTimePickers,
Combos.
I'd like to line up them and put them as close as possible in the vertical
direction. But due to different default heights of different controls
(Textbox.Height = 20, Combobox.Height =21) I cannot do it.

What properties of controls do I have to set first to allow to set the same
heights for controls?

Thank you

vovan
Jun 27 '08 #1
6 835
Vovan,

In the options you can set the used pixels of your IDE, probably this will
be the way to reach your goal.

Don't ask me where exact I never do this, I keep the let say standard
distance between boxes, I don't want to be hated by the end users.

Cor

"vovan" <v@v.comschreef in bericht
news:e0*************@TK2MSFTNGP05.phx.gbl...
>I need to place many controls on the form - Textboxes, DateTimePickers,
Combos.
I'd like to line up them and put them as close as possible in the vertical
direction. But due to different default heights of different controls
(Textbox.Height = 20, Combobox.Height =21) I cannot do it.

What properties of controls do I have to set first to allow to set the
same heights for controls?

Thank you

vovan
Jun 27 '08 #2
I need to have controls on the form located in 2 virtual columns and many
virtual rows.
Let's assume that in the first row I have 2 textboxes. So far everything's
OK - their top and bottom properties are the same. I'm adding another row of
controls - 2 textboxes. The distance bitween the bottom of the controls in
the first row and top of the controls of the second row is the same. - Good.
I add a third row with one textbox and 1 combo. Then the 4th row with
controls. Now I have different space between the third and fourth row
controls.
And I wouldn't want to have it.

Thank you

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:B6**********************************@microsof t.com...
Vovan,

In the options you can set the used pixels of your IDE, probably this will
be the way to reach your goal.

Don't ask me where exact I never do this, I keep the let say standard
distance between boxes, I don't want to be hated by the end users.

Cor

"vovan" <v@v.comschreef in bericht
news:e0*************@TK2MSFTNGP05.phx.gbl...
>>I need to place many controls on the form - Textboxes, DateTimePickers,
Combos.
I'd like to line up them and put them as close as possible in the
vertical direction. But due to different default heights of different
controls (Textbox.Height = 20, Combobox.Height =21) I cannot do it.

What properties of controls do I have to set first to allow to set the
same heights for controls?

Thank you

vovan

Jun 27 '08 #3
"vovan" <v@v.comschrieb
I need to have controls on the form located in 2 virtual columns and
many virtual rows.
Let's assume that in the first row I have 2 textboxes. So far
everything's OK - their top and bottom properties are the same. I'm
adding another row of controls - 2 textboxes. The distance bitween
the bottom of the controls in the first row and top of the controls
of the second row is the same. - Good. I add a third row with one
textbox and 1 combo. Then the 4th row with controls. Now I have
different space between the third and fourth row controls.
And I wouldn't want to have it.
After adding one row, use the height of the largest control in the row
to calculate the top of the next row.
Armin

Jun 27 '08 #4

"Armin Zingler" <az*******@freenet.dewrote in message
news:ul**************@TK2MSFTNGP02.phx.gbl...
"vovan" <v@v.comschrieb
>I need to have controls on the form located in 2 virtual columns and
many virtual rows.
Let's assume that in the first row I have 2 textboxes. So far
everything's OK - their top and bottom properties are the same. I'm
adding another row of controls - 2 textboxes. The distance bitween
the bottom of the controls in the first row and top of the controls
of the second row is the same. - Good. I add a third row with one
textbox and 1 combo. Then the 4th row with controls. Now I have
different space between the third and fourth row controls.
And I wouldn't want to have it.

After adding one row, use the height of the largest control in the row to
calculate the top of the next row.
Armin
You can use the TableLayout control. Each time you want to add a new row
there is a method for that and then you add the controls. It is a good way
to keep the tops correct.

LS

Jun 27 '08 #5
Vovan,

If you want it you can inherit all controls to build your own and paint by
instance a nice thick border around those which are in your idea to small.

Cor

"vovan" <v@v.comschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I need to have controls on the form located in 2 virtual columns and many
virtual rows.
Let's assume that in the first row I have 2 textboxes. So far everything's
OK - their top and bottom properties are the same. I'm adding another row
of controls - 2 textboxes. The distance bitween the bottom of the controls
in the first row and top of the controls of the second row is the same. -
Good.
I add a third row with one textbox and 1 combo. Then the 4th row with
controls. Now I have different space between the third and fourth row
controls.
And I wouldn't want to have it.

Thank you

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:B6**********************************@microsof t.com...
>Vovan,

In the options you can set the used pixels of your IDE, probably this
will be the way to reach your goal.

Don't ask me where exact I never do this, I keep the let say standard
distance between boxes, I don't want to be hated by the end users.

Cor

"vovan" <v@v.comschreef in bericht
news:e0*************@TK2MSFTNGP05.phx.gbl...
>>>I need to place many controls on the form - Textboxes, DateTimePickers,
Combos.
I'd like to line up them and put them as close as possible in the
vertical direction. But due to different default heights of different
controls (Textbox.Height = 20, Combobox.Height =21) I cannot do it.

What properties of controls do I have to set first to allow to set the
same heights for controls?

Thank you

vovan

Jun 27 '08 #6
"Lloyd Sheen" <a@b.cschrieb
After adding one row, use the height of the largest control in the
row to calculate the top of the next row.
Armin

You can use the TableLayout control. Each time you want to add a new
row there is a method for that and then you add the controls. It is a
good way to keep the tops correct.
Yes, right, I forgot that. There are so many ways and components
nowadays that I do not consider them all sometimes. :-)
Armin

Jun 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: rufus | last post by:
I am created a table dynamically and I have wrapped it in a div tag so that the user can scroll the table horizontally ie I have added an overflow property to the div. I dont want the user to be...
1
by: Phil Stanton | last post by:
I am trying to create a text box in Word the same height as one on a report and then fill it with text. I can "read" the position of the text box from the report OK and create a text box in Word...
0
by: Isz | last post by:
Hi... I can load images into a webform with the following code, but I can't get the width or height properties... but I can set them ok... I figure it might be because the images aren't loaded...
5
by: Eric | last post by:
Given System.Web.UI.Control Control Can I determine the height of Control without knowing specifically what it is?
2
by: Robson Carvalho Machado | last post by:
Dear friends, I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an 1px transparent image only to determine link position, but as I create this link dynamically I could not...
6
by: Rob | last post by:
I need to create a form that will resize only the verticle size of the Form and not the width. So far I'm partial to the following code. Can someone please elaborate the ??? . . . . Const...
1
by: Wotney | last post by:
Hoping someone out there can help... I have an UpdatePanel that uses Atlas/Ajax to update it's contents without having to postback the entire page. (pnlUpdate) Within pnlUpdate I have a normal...
2
by: JMT | last post by:
Hello, I get some dynamic controls (ASP .Net) inside a table, the height property of the table is variable according the controls loaded, so I need to know the final table height, this value...
1
by: Bob Alston | last post by:
I have a system where many subforms are used. Often the size of the subform had to be larger than could be displayed without scrolling. I set the height of the subform to the typical height...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.