473,471 Members | 4,616 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

RadioButtonList ????

BG
Hey All,

I have a vertical RadioButtonList w/ textalign=right and borders enabled. I
want to resize the borders based on the pixel length of the item text. I am
trying to use the graphics.measurestring class but can't seem to get the
coding right. Any examples would be most appreciated.

Thanks

BG
Nov 21 '05 #1
5 1155
BG,

When you will help to get the coding right without showing any code.

Can you give us an idea how that we can do that for you?

:-)

Cor
Nov 21 '05 #2
"BG" <bg*****@yahoo.com> schrieb:
I have a vertical RadioButtonList w/ textalign=right and borders enabled.
I
want to resize the borders based on the pixel length of the item text. I
am
trying to use the graphics.measurestring class but can't seem to get the
coding right.


'MeasureString' is part of GDI+ and is typically used in Windows Forms
applications. I doubt that it will work in Web Forms applications, because
they use a completely different rendering model. Users can change a page's
font size using the browser's menu easily.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Herfried,

I use it in that webside clock sample of my

http://groups-beta.google.com/group/...bb4008d3d7a709

So maybe we found together the answer for the OP

:-)

Cor
Nov 21 '05 #4
Cor,

"Cor Ligthert" <no************@planet.nl> schrieb:
I use it in that webside clock sample of my

http://groups-beta.google.com/group/...bb4008d3d7a709

So maybe we found together the answer for the OP


I assume the OP doesn't use GDI+ to draw text, and thus 'MeasureString'
doesn't solve his problem. But yes, you can use 'MeasureString' if you draw
the text using 'DrawString'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5
BG
Thanks Herfried,

I had a hunch that this was the case.

BG

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OV**************@TK2MSFTNGP10.phx.gbl...
"BG" <bg*****@yahoo.com> schrieb:
I have a vertical RadioButtonList w/ textalign=right and borders enabled. I
want to resize the borders based on the pixel length of the item text. I
am
trying to use the graphics.measurestring class but can't seem to get the
coding right.
'MeasureString' is part of GDI+ and is typically used in Windows Forms
applications. I doubt that it will work in Web Forms applications,

because they use a completely different rendering model. Users can change a page's font size using the browser's menu easily.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6

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

Similar topics

3
by: Tapi | last post by:
Hello there, I am new to ASP .NET and am tryimg to create a RadioButtonList dynamically. My code below gives an "Index was out of range" error. Where am I going wrong?
6
by: Hazzard | last post by:
I store radiobuttonlist values in the db using the string value of the radio button item value. (nvarchar) I am creating an edit functionality on the asp.net form so that when I reuse my...
3
by: William LaMartin | last post by:
If I create a RadioButtonList with, say, two items, then after the page loads and I select one of the items and then click on a button whose click event contains some code to display the...
5
by: DotNetGruven | last post by:
Anyone have any pointers on how to set the Value and Selected attributes in a ListItem in a RadioButtonList that is in a DataGrid? Here's what I have ------DataGrid------ -- BoundColumn 0 --...
6
by: DotNetGruven | last post by:
I have a webform that has a DataGrid on it with a RadioButtonList in each row. It is a simple On & Off. When the User Clicks on either of the RadioButtons, I need to postback to the server and...
4
by: Emil | last post by:
Can somebody tell me what would be the syntax for having an if statement and setting the selected index of a radiobuttonlist? This is my first project using ASP.net and I use C#. I have a repeater...
4
by: juststarter | last post by:
Hello, I have an aspx file where i've put a placeholder element. On load (page_load) i create dynamically an html table which contains a checkbox and a radiobuttonlist in each tablerow . The...
5
by: Øyvind Isaksen | last post by:
I'm making a page to update articles. When a radiobuttonlist is displayed, I want the stored value to be displayed as default (checked). Example: I use a procedure to display the...
5
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hallo, I have a radiobuttonlist control that is added on a custom Web User Control. This control has a property that exposes the SelectedIndex property of the embedded radiobuttonlist. When...
6
by: SAL | last post by:
hello, I'm using a radiobuttonlist in an updatepanel in an item template in a Gridview control. I'm populating the radiobuttonlist in the RowDataBound event. I have the control toolkit registered...
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
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.