473,747 Members | 2,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 10296


"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.mi crosoft.comwrot e in
message news:04******** *************** ***********@mic rosoft.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.mi crosoft.comwrot e in
message news:04******** *************** ***********@mic rosoft.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.mi crosoft.comwrot e in
message news:96******** *************** ***********@mic rosoft.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.mi crosoft.comwrot e in
message news:04******** *************** ***********@mic rosoft.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
3504
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 -------------------------------------------------------------- RCSOFT, Lda.
1
4046
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 can be true). So I've created a class inheriting from DataGridColumnStyle and added the following code to the class: protected RadioButton rb ; ....
3
7275
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 a postback. I only want to do a postback if the value of the radiobutton is changed. What is the best method to accomplish this? thx dave
1
11434
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 such: <input name="MyName" TYPE="radio" class="bigRadio" VALUE="MyValue" checked> This works in a static HTML file, but I'm trying to make an ASP.NET version
6
9293
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 posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-csharp/200605/1
1
4230
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 is brought in to a form? This is probably a very basic question, but I appreciate any help anyone can offer.
8
3426
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 Me.Height = 16
1
6228
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 excess columns. Now the 1st row should look like it has only 1 cell, and the 2nd row has 3 cells. Now add a Web Forms DataGrid in row, and add a Web Forms Button in the middle cell of row 2. Now, when I try to resize the row, I can’t seem to get...
11
7654
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 characters into the display myself - but that's not the main issue at this time. I've tried a scrolling multiline text box but once the original viewable area fills up and it starts scrolling the flashing of the entire area drives me nuts. The...
0
8978
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8818
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9353
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9305
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9222
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8231
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4588
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2771
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.