473,396 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Link Label Disabling

Hi,

Dumb question, but can someone explain to me how the LinkLabel
'DisabledLinkColor' property works...?

I have a LinkLabel on my form that allows the user to jump to another form,
however under certain circumstances I don't want them to be able to do this
do I disable the link

myLink.Enabled = false;

But, when I do this, I want the disabled link to be Black, not grey (so that
it looks like a normal label) so I also say:

myLink.DisabledLinkColor = Color.Black;

Seems straight forward, but the link is ALWAYS grey

Anyone tell me what I'm a-doin' wrong...?

Cheers,

Chris.
Jun 6 '06 #1
2 3006
Try setting the Enabled property of the actual Link that you'd like to
disable instead of the entire LinkLabel control.
http://msdn2.microsoft.com/en-us/sys...k.enabled.aspx

--
Tim Wilson
..NET Compact Framework MVP

"ChrisM" <ch**************@suedeyahoo.com> wrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
Hi,

Dumb question, but can someone explain to me how the LinkLabel
'DisabledLinkColor' property works...?

I have a LinkLabel on my form that allows the user to jump to another
form, however under certain circumstances I don't want them to be able to
do this do I disable the link

myLink.Enabled = false;

But, when I do this, I want the disabled link to be Black, not grey (so
that it looks like a normal label) so I also say:

myLink.DisabledLinkColor = Color.Black;

Seems straight forward, but the link is ALWAYS grey

Anyone tell me what I'm a-doin' wrong...?

Cheers,

Chris.

Jun 6 '06 #2
Doh!

Thanks Tim. Serves me right for not reading the documentation properly I
guess... ;-)

Chris.

"Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Try setting the Enabled property of the actual Link that you'd like to
disable instead of the entire LinkLabel control.
http://msdn2.microsoft.com/en-us/sys...k.enabled.aspx

--
Tim Wilson
.NET Compact Framework MVP

"ChrisM" <ch**************@suedeyahoo.com> wrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
Hi,

Dumb question, but can someone explain to me how the LinkLabel
'DisabledLinkColor' property works...?

I have a LinkLabel on my form that allows the user to jump to another
form, however under certain circumstances I don't want them to be able to
do this do I disable the link

myLink.Enabled = false;

But, when I do this, I want the disabled link to be Black, not grey (so
that it looks like a normal label) so I also say:

myLink.DisabledLinkColor = Color.Black;

Seems straight forward, but the link is ALWAYS grey

Anyone tell me what I'm a-doin' wrong...?

Cheers,

Chris.


Jun 7 '06 #3

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

Similar topics

0
by: Steve Bezner | last post by:
I have an issue in which a link label on a windows form does not draw the focus rectangle if you programmatically force it to have focus via the Control.Focus() method. To duplicate, create a...
0
by: Steve Bezner | last post by:
I have an issue in which a link label on a windows form does not draw the focus rectangle if you programmatically force it to have focus via the Control.Focus() method. To duplicate, create...
1
by: Russ Green | last post by:
I hav previosuly had VB.NET 2003 Standard installed on my machine and it works great. Yesterday I installed C++.NET 2003 Standard and starting playing with it. Hardly surprisingly it also worked...
6
by: Rod Snyder | last post by:
I'm trying to set up a page with an asp.net link button that would send a user to a certain page and on page load execute a specific stored procedure tied to the button on the previous page. The...
2
by: Dot net work | last post by:
Hello. I have an aspx page that changes an HTML label's text using javascript. After the label's text has been changed in this way, I redirect to another aspx page. If I then use the back...
8
by: David | last post by:
This is something I had never seen before. On an aspx page, upon pressing a link button for which I have an event handler in the code behind, the screen shows nothing but a line that says "true"...
3
by: Ralph | last post by:
Hi I have small function to generate my form controls: function buildInput(sType, vValue, vId, sName, sLabel){ var oInput = null; var oLabel = document.createElement('label'); var oCont =...
8
by: Neil | last post by:
I just started using Access 2003, and I can't link a SQL Server table. I right-click on the database window; select Link Tables; and select ODBC Databases from the Files of Type dropdown. As soon...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.