Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Change "Enabled" appearance for a LinkButton

Reply
Thread Tools

Change "Enabled" appearance for a LinkButton

 
 
Nils M. Lunde
Guest
Posts: n/a
 
      10-30-2003
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!

----
Nils Magne Lunde
Options AS
 
Reply With Quote
 
 
 
 
HD
Guest
Posts: n/a
 
      10-30-2003
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

"Nils M. Lunde" <> wrote in message
news...
> 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!
>
> ----
> Nils Magne Lunde
> Options AS



 
Reply With Quote
 
 
 
 
Nils M. Lunde
Guest
Posts: n/a
 
      10-31-2003

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
>
> "Nils M. Lunde" <> wrote in message
> news...
>> 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!
>>
>> ----
>> Nils Magne Lunde
>> Options AS

>
>




--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
 
Reply With Quote
 
James Radke
Guest
Posts: n/a
 
      10-31-2003
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" <> wrote in message
news...
>
> 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
> >
> > "Nils M. Lunde" <> wrote in message
> > news...
> >> 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!
> >>
> >> ----
> >> Nils Magne Lunde
> >> Options AS

> >
> >

>
>
>
> --
> Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linkbutton does not look like a linkbutton Sathyaish ASP .Net 3 09-08-2005 09:41 AM
Linkbutton does not look like a linkbutton Sathyaish ASP .Net Datagrid Control 1 09-08-2005 08:44 AM
retain anchor and linkbutton text appearance after it is clicked Steve Richter ASP .Net 1 05-20-2005 09:04 PM
Moz 1.7- how do you change appearance Gordon Abbot Firefox 2 04-10-2005 05:01 AM
Re: How to change appearance of Drop Down List control? bruce barker ASP .Net 1 08-13-2003 04:45 PM



Advertisments