473,395 Members | 1,441 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,395 software developers and data experts.

Radiobutton Autosize does not increase the height (Windows forms)

I am using VB.NET, VS 2005
Add a windows form and in design view:

Add a Radiobutton to the windows form
Set AutoSize = True for the radiobutton
Set the MaximumSize width to 90 for the radiobutton
Enter text for the radiobutton which is longer than the default
Run it - the height of the radiobutton does not increase, and the text is
truncated.

If the MaximumSize for the width is not set, then the autosize increase the
width to accommodate the long text, but the height will not increase if the
maximum width is not adequate.

What am I overlooking?
Thanks
Bill
Dec 19 '07 #1
5 10263


"BillE" wrote:
I am using VB.NET, VS 2005
Add a windows form and in design view:

Add a Radiobutton to the windows form
Set AutoSize = True for the radiobutton
Set the MaximumSize width to 90 for the radiobutton
Enter text for the radiobutton which is longer than the default
Run it - the height of the radiobutton does not increase, and the text is
truncated.

If the MaximumSize for the width is not set, then the autosize increase the
width to accommodate the long text, but the height will not increase if the
maximum width is not adequate.

What am I overlooking?
Thanks
Bill
Are you overlooking that the width needed to fit the text is more than 90?
>
Dec 19 '07 #2
I want it to autosize the Height, F.T. Mike. Sorry I didn't explain it
better. I said: "the height will not increase if the
maximum width is not adequate"

If I create a label, for example, with Autosize = true, maximum width = 90,
and the text is too large for the maximum width, then the label expands
vertically. This doesn't appear to happen for a Radio button to display the
complete text.
"Family Tree Mike" <Fa************@discussions.microsoft.comwrote in
message news:04**********************************@microsof t.com...
>

"BillE" wrote:
>I am using VB.NET, VS 2005
Add a windows form and in design view:

Add a Radiobutton to the windows form
Set AutoSize = True for the radiobutton
Set the MaximumSize width to 90 for the radiobutton
Enter text for the radiobutton which is longer than the default
Run it - the height of the radiobutton does not increase, and the text is
truncated.

If the MaximumSize for the width is not set, then the autosize increase
the
width to accommodate the long text, but the height will not increase if
the
maximum width is not adequate.

What am I overlooking?
Thanks
Bill

Are you overlooking that the width needed to fit the text is more than 90?
>>

Dec 19 '07 #3
OK, now I understand what you mean, but I don't have a solution. I was
surprised to see that I could include a \n in the string to get a multiline
lable. With no "wrap" or multiline attribute, I'm not sure what you could do.

"BillE" wrote:
I want it to autosize the Height, F.T. Mike. Sorry I didn't explain it
better. I said: "the height will not increase if the
maximum width is not adequate"

If I create a label, for example, with Autosize = true, maximum width = 90,
and the text is too large for the maximum width, then the label expands
vertically. This doesn't appear to happen for a Radio button to display the
complete text.
"Family Tree Mike" <Fa************@discussions.microsoft.comwrote in
message news:04**********************************@microsof t.com...


"BillE" wrote:
I am using VB.NET, VS 2005
Add a windows form and in design view:

Add a Radiobutton to the windows form
Set AutoSize = True for the radiobutton
Set the MaximumSize width to 90 for the radiobutton
Enter text for the radiobutton which is longer than the default
Run it - the height of the radiobutton does not increase, and the text is
truncated.

If the MaximumSize for the width is not set, then the autosize increase
the
width to accommodate the long text, but the height will not increase if
the
maximum width is not adequate.

What am I overlooking?
Thanks
Bill
Are you overlooking that the width needed to fit the text is more than 90?
>


Dec 20 '07 #4
The only thing I can think of is to dynamically calculate how much
horizontal space I have for dynamically created controls, calculate how many
pixels I need for the caption text, and then calculate what the height will
have to be to accommocate the text. PITA.

What I don't understand is why the radio button control has a maximum size
property with a height component when the auto size won't increase the
height! Is it a bug?
"Family Tree Mike" <Fa************@discussions.microsoft.comwrote in
message news:96**********************************@microsof t.com...
OK, now I understand what you mean, but I don't have a solution. I was
surprised to see that I could include a \n in the string to get a
multiline
lable. With no "wrap" or multiline attribute, I'm not sure what you could
do.

"BillE" wrote:
>I want it to autosize the Height, F.T. Mike. Sorry I didn't explain it
better. I said: "the height will not increase if the
maximum width is not adequate"

If I create a label, for example, with Autosize = true, maximum width =
90,
and the text is too large for the maximum width, then the label expands
vertically. This doesn't appear to happen for a Radio button to display
the
complete text.
"Family Tree Mike" <Fa************@discussions.microsoft.comwrote in
message news:04**********************************@microsof t.com...
>

"BillE" wrote:

I am using VB.NET, VS 2005
Add a windows form and in design view:

Add a Radiobutton to the windows form
Set AutoSize = True for the radiobutton
Set the MaximumSize width to 90 for the radiobutton
Enter text for the radiobutton which is longer than the default
Run it - the height of the radiobutton does not increase, and the text
is
truncated.

If the MaximumSize for the width is not set, then the autosize
increase
the
width to accommodate the long text, but the height will not increase
if
the
maximum width is not adequate.

What am I overlooking?
Thanks
Bill
Are you overlooking that the width needed to fit the text is more than
90?



Dec 20 '07 #5
BillE,

There are lot of controls which have properties which don't do anything.

That is the way OOP in Net is working. The RadioButton is inheritted from
Control. Everytime that you inherrit a class then you get all its
properties.

The base class is Object (that is where by instance to ToString is in). One
of the most famous properties is the "Dispose" which is in the component
class, which is inherited by 20% of the most classes however those are
probably those which are the most frequently used. The effect of this is
that a lot of people think you should use it, while in most cases it is only
a placeholder to put in your own code if you need that.

The same is with your problem, you can use the propertie to put in your own
code (by instance own painting). However don't expect that it is working
forever direct as it is as in other inherited classes. While it even can be
shadowed to stop the behaviour at a higher level. A property from a higher
level stays however always visible.

I hope that this explains a little bit your problem.

Cor
Dec 22 '07 #6

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

Similar topics

1
by: | last post by:
How I can autosize a DataGrid after then associate a Datasource=Dataset in Smart Devices applications or Windows forms application?? That same?? -- Cumprimentos, David de Passos...
1
by: Dmitry V. Markin | last post by:
Good day! Here is my problem: I need to have a radiobutton column in my DataGrid for a representation of a bool column, where only row can be checked at one time(only one value in bool column...
3
by: dave | last post by:
I have half a dozen web form radio buttons on a web form. Each of them is set to postback=true. However, if for instance radiobutton1 is already selected and the user selects it again, it performs...
1
by: epigram | last post by:
I've got the following sytle: input.bigRadio { width: 45px; height: 45px; padding: 0px 0px 0px 0px} which I am applying to radio buttons to make them larger by applying this bigRadio class as...
6
by: Radiobutton via DotNetMonster.com | last post by:
i need help with radiobuttons. i am useing 1button and 2 radiobuttons i am trying to make it so when u select a radiobutton and hit button1 it will clear radiobuttons 1 and 2. -- Message...
1
by: matthewtech | last post by:
In Visual Studio 2005, using Visual Basic, Is there a way to set the autosize property to false as a standard, and change it to true as needed? Or does it always start out as true when a label ...
8
by: Jordi Rico | last post by:
Hi, I've made the next inherited class in Visual Studio 2005: Public Class LabelEx Inherits System.Windows.Forms.Label Sub New() MyBase.New() Me.ForeColor = Color.Black Me.AutoSize = False...
1
by: SAL | last post by:
How do I get a CELL to autosize a round a Control in a HTML Table? For example, you add a 2 row, 3 column HTML table to your webpage. In the 1st row, you set the colspan=3, then delete the...
11
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I know I sound like a one-note Johnny on this but I'm still looking for a solution. I need to display characters coming in from a serial port or a socket. I also need to be able to type...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.