Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Size Radio button

Status
Not open for further replies.

djj55

Programmer
Feb 6, 2006
1,761
US
How do I make the radio button in VB.NET 2003 larger? I change the font and the text changes but the button is still same size. Failing this can I change the size of the check box?

Users complain about not being able to see whether something has been selected.

Thanks for any pointers,
djj
 
There doesn't appear to be any way to increase the size of either the radio buttons or checkboxes. I tried setting the Autosize property of the controls to No, and increased the width and height of the controls, but that doesn't resize the radio button or checkbox. You may want to look into creating your own user control.
 
Thank you for your reply. It seems like every time I want to do something I am forced to use code, maybe they should call this Visual Code instead of Basic!
djj

Sorry I just get upset at not having what seems to be obviously needed.
 
If your users are having trouble seeing the radio buttons/checkboxes, maybe they have their screen resolution set too high.
 
Or work in a factory where lighting/computer abuse are a factor.
djj
 
You can change the mode that they appear from the default to graphical i think.They will be represented as buttons - on or off
 
But i do not really like this way,... the graphical one. I would o this: Extend these 2 controls and add them 2 properties: On_color and Off_color. Also i would override their default event handler (Check changed (something like that..i do not remember)) and change there the forecolor. If check the Oc_color, else Off_color.
This will give a better visual... That!

Hope this helps .
 
One way I tried but did not like was to use the button and change the text from "---" to " X " which involved the use of the CheckedChanged property. This is a lot of code but it seems to work. The problem comes when I try and define which of four radio buttons is checked from a numeric. I got this to work but did not like the result.

Thanks for all the tips,
djj
 
" This is a lot of code but it seems to work "

> Tha's why i suggested to inherit and extend a little these controls. To avoid having all this useless extra code,and be able to write once.

> I would suggest playing with the colors.


To know which radio is checked::

Write a sub tha handles the checkchanged of all radios (the radios that are for a specific option, not all:) ). Set each radio's TAG to 1, 2 ... etc. Last do something like:

ra1 = integer.parse(ctype(sender,radiobutton).tag)

The ra1 is for example private declared in the class, and integer.


Hope these help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top