Groups | Blog | Home
all groups > vb.net controls > october 2006 >

vb.net controls : ComboBox Height


JJ
10/13/2006 6:35:59 PM
OK, I'm new to this development environment, but I'm confused about my
combobox height. I'm using datasets, and I drag the dataset field to
my form. Textbox's have a height of 21 and ComboBox's have a height
of 26, and I am using the same Font size of 9. It looks like crap on
my form when a combobox is larger than a textbox on the same line. I
can't change these values in the Size property, cuz they get set to
whatever they were before. Whats the point of having properties if I
can't change them? Am I doing something wrong, and if so, whats the
proper method for doing this really simple task?

JJ
10/13/2006 7:20:55 PM
I am using VS2005. Are you telling me I have to write 20 lines of
code to change the height of a comboBox, and can't do this in design
mode?

On Sat, 14 Oct 2006 02:42:19 +0200, "Herfried K. Wagner [MVP]"
[quoted text, click to view]
Herfried K. Wagner [MVP]
10/14/2006 2:42:19 AM
<JJ> schrieb:
[quoted text, click to view]

Setting the height of a combobox control
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=comboboxheight&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
Herfried K. Wagner [MVP]
10/14/2006 2:06:01 PM
<JJ> schrieb:
[quoted text, click to view]


Yes. As you may have noticed all forms in Windows suffer from the different
height of textbox and combobox controls. This is simply "by design", and
thus adjusting the combobox' height is not supported out of the box.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
HKSHK
10/14/2006 3:21:02 PM
Dear Mr. Wagner,

[quoted text, click to view]

It's a "feature" of .NET, not of Windows. With VB 5 I can adjust the
height of the textbox to match the height of the combobox (combobox is
read-only). In VB.NET (2003) I don't even have that chance...


Best Regards,

Herfried K. Wagner [MVP]
10/15/2006 2:12:30 AM
"HKSHK" <hkshk@gmx.net> schrieb:
[quoted text, click to view]

Well, yes, you could, but then the textbox was too high...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
JJ
10/15/2006 4:59:13 PM
Thanks all for the info. Seems like Microsoft ought to put a warning
label on their software products:

ie

Warning: Visual Studio won't allow you to resize any of the controls
in the design environment. We allow you to change the Size property,
but reset it to some default we decided on.

Warning: Visual Studio will not open a Project created by another
developer, no matter what. We don't know why, and never will.

Warning: We don't understand complex data binding either, so if you
figure it out, contact us somehow.

Warning: We continue to upgrade our products, but don't believe for a
moment that we are going to fix any existing problems. We are
required to upgrade our products periodically, but mostly we simply
add more fluff.

Warning: Periodically, like once a day, you will be required to Reboot
your system and reload Visual Studio. We don't know why, but if you
figure it out, contact us somehow.

Warning: We know that back end data sources change, but we don't know
how to update them in your current Project when your using a dataset.
If you figure it out, contact us somehow.

Warning: We know that we have many megabytes of help data, but that
doesn't mean we can figure out what your seeking help on, even if you
have pressed F1 on a particular property.

Warning: We are going to hide a lot of the critical code that supports
your application, but don't worry about it, we know whats best.

Warning: You are required to patch all of our products frequently,
because we believe that our products should be patched whenever
someone discovers a hole that requires patching.

Warning: We have decided to add tons of new features and we did not
ask for your opinion. You will of course, be required to pay for
these new features every year. And it goes without saying that
"Nothing is backward compatible."

Warning: We will give you the opportunity to to contact technical
support on this product, but don't believe for a moment that they know
more than you.

And now we've got some weight to this product!




On Sun, 15 Oct 2006 02:12:30 +0200, "Herfried K. Wagner [MVP]"
[quoted text, click to view]
AddThis Social Bookmark Button