Change "Enabled" appearance for a LinkButton

N

Nils M. Lunde

Hi!

I'm trying to make a LinkButton appear black and not dimmed when disabled.
To accomplish this I tried to override the Enabled property, but wthout
any luck.
No matter what I do in my derived property, the control remains dimmed.

How can I make the disabled LinkButton appear black, or
alternatively turn the LinkButton into a non-clickable black text field?

Thanks in advance!
 
H

HD

i think the code that is generated if the link button is disabled is just
<span style="">your text</span> whereas if active its is <a href="">your
text</a>
y not use inherit from linkbutton and in render method use whatever output
you fancy instead of say <span></span> with greyed out text

HD
 
N

Nils M. Lunde

That worked like a charm!

....but I still don't understand why the text is greyed out when I inherit
the Enabled property.
If I don't set MyBase.Enabled to false, how can the program know that it
should print the text greyed out?

Well, now it works anyway :)
Thanx!

-Nils Magne
i think the code that is generated if the link button is disabled is just
<span style="">your text</span> whereas if active its is <a href="">your
text</a>
y not use inherit from linkbutton and in render method use whatever
output
you fancy instead of say <span></span> with greyed out text

HD
 
J

James Radke

Nils,

I am looking at doing the same thing.. do you have a sample of your new
Class you created inherited from the LinkButton? Would you be willing to
share this?

Thanks

Jim

Nils M. Lunde said:
That worked like a charm!

...but I still don't understand why the text is greyed out when I inherit
the Enabled property.
If I don't set MyBase.Enabled to false, how can the program know that it
should print the text greyed out?

Well, now it works anyway :)
Thanx!

-Nils Magne
 

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,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top