How to change font of selected item in RadioButtonList

P

Peter Afonin

Hello:

Is it posiible to change somehow the font or background of selected item in
RadioButtonList? I just want to make it more visible - to make font bold, or
just highlight the background. Cannot figure out how to do this.

Thank you,
 
A

Alvin Bruney [MVP]

the radiobutton exposes the font and bordercolor properties. have a look at
them.
 
P

Peter Afonin

Thank you.

I'm not talking about the radiobutton, I'm talking about the radiobuttonlist
control. It has all these properties, but not for the selected item.

Peter

Alvin Bruney said:
the radiobutton exposes the font and bordercolor properties. have a look at
them.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Peter Afonin said:
Hello:

Is it posiible to change somehow the font or background of selected item in
RadioButtonList? I just want to make it more visible - to make font
bold,
 
A

Alvin Bruney [MVP]

Sorry,
you may be able to do this by adding an attribute to the selected item. for
example
RadioButtonList1.Items[RadioButtonList1.selectedindex].Attributes.Add("font"
,"tahoma");


--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Peter Afonin said:
Thank you.

I'm not talking about the radiobutton, I'm talking about the radiobuttonlist
control. It has all these properties, but not for the selected item.

Peter

Alvin Bruney said:
the radiobutton exposes the font and bordercolor properties. have a look at
them.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Peter Afonin said:
Hello:

Is it posiible to change somehow the font or background of selected
item
in
RadioButtonList? I just want to make it more visible - to make font
bold,
or
just highlight the background. Cannot figure out how to do this.

Thank you,
 
P

Peter Afonin

Thank you, Alvin.

I tried this - didn't work. I tried

Me.rblHosting.Items(Me.rblHosting.SelectedIndex).Attributes.Add("bgcolor",
"red")
Me.rblHosting.Items(Me.rblHosting.SelectedIndex).Attributes.Add("Font",
"Bold") etc.

Perhaps I'm missing something.

Peter

Alvin Bruney said:
Sorry,
you may be able to do this by adding an attribute to the selected item. for
RadioButtonList1.Items[RadioButtonList1.selectedindex].Attributes.Add("font"
,"tahoma");


--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Peter Afonin said:
Thank you.

I'm not talking about the radiobutton, I'm talking about the radiobuttonlist
control. It has all these properties, but not for the selected item.

Peter

Alvin Bruney said:
the radiobutton exposes the font and bordercolor properties. have a
look
at
them.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Hello:

Is it posiible to change somehow the font or background of selected item
in
RadioButtonList? I just want to make it more visible - to make font bold,
or
just highlight the background. Cannot figure out how to do this.

Thank you,
 
A

Alvin Bruney [MVP]

You got me on this one. I couldn't make it work either. Turns out it is a
bug. There is a workaround here if you follow this link.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309338

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Peter Afonin said:
Thank you, Alvin.

I tried this - didn't work. I tried

Me.rblHosting.Items(Me.rblHosting.SelectedIndex).Attributes.Add("bgcolor",
"red")
Me.rblHosting.Items(Me.rblHosting.SelectedIndex).Attributes.Add("Font",
"Bold") etc.

Perhaps I'm missing something.

Peter

Alvin Bruney said:
Sorry,
you may be able to do this by adding an attribute to the selected item. for
RadioButtonList1.Items[RadioButtonList1.selectedindex].Attributes.Add("font"
,"tahoma");


--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Peter Afonin said:
Thank you.

I'm not talking about the radiobutton, I'm talking about the radiobuttonlist
control. It has all these properties, but not for the selected item.

Peter

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
the radiobutton exposes the font and bordercolor properties. have a look
at
them.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Hello:

Is it posiible to change somehow the font or background of
selected
item
in
RadioButtonList? I just want to make it more visible - to make font
bold,
or
just highlight the background. Cannot figure out how to do this.

Thank you,
 
P

Peter Afonin

Thank you, Alvin. I'll try it.

Peter

Alvin Bruney said:
You got me on this one. I couldn't make it work either. Turns out it is a
bug. There is a workaround here if you follow this link.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309338

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Peter Afonin said:
Thank you, Alvin.

I tried this - didn't work. I tried

Me.rblHosting.Items(Me.rblHosting.SelectedIndex).Attributes.Add("bgcolor",
"red")
Me.rblHosting.Items(Me.rblHosting.SelectedIndex).Attributes.Add("Font",
"Bold") etc.

Perhaps I'm missing something.

Peter

item.
for
RadioButtonList1.Items[RadioButtonList1.selectedindex].Attributes.Add("font"
,"tahoma");


--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Thank you.

I'm not talking about the radiobutton, I'm talking about the
radiobuttonlist
control. It has all these properties, but not for the selected item.

Peter

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
the radiobutton exposes the font and bordercolor properties. have
a
look
at
them.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Hello:

Is it posiible to change somehow the font or background of selected
item
in
RadioButtonList? I just want to make it more visible - to make font
bold,
or
just highlight the background. Cannot figure out how to do this.

Thank you,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top