changing the font color of a label

I've read MSDN and found this but It's not doing anything. I might have read it wrong and left something out.

Public Shared ReadOnly Property LightGray() As Color
Get
'maybe something goes in here?
End Get
End Property

'and then I do this
Me.lblItem2.ForeColor = LawnGreen

It just doesn't do anything to my label

0
lrsd
2/7/2006 1:02:41 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

2 Replies
508 Views

Similar Articles

[PageSpeed] 1

Oh and they're both LightGray. I wasn't paying attention when I pasted code in here.
0
lrsd
2/7/2006 4:28:51 PM

Not sure what you're doing with the Property LightGray(), but all you have to do is assign one of the predefined colors in your code as follows:

lblItem2.ForeColor = Drawing.Color.Blue

 

0
jcasp
2/7/2006 6:51:25 PM
Reply:

Similar Artilces:

I cant get the font color of a label to change.
Okay I have the label font to default to green. I have this code to run if something goes wrong:   lblResult.Text = "Please fill out the form." lblResult.ForeColor = System.Drawing.Color.Red lblResult.Focus()   The label text changes, the font stays green for some reason, I can't figure out why.  I tried to put the font color before the text change or after but it won't change.  I tried it with the program below, ColorChange.aspx, and it worked.    <%@ Page Language="VB&q...

Signature font and color changes to message font and color
My first post. When I compose a message no matter what the signature font and color is set to, it changes to whatever the font and color is of the message. Is there a fix for this? I would ask my job's tech support but I wouldn't trust them to sit the right way on a toilet seat. -- doover ------------------------------------------------------------------------ doover, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, ...

In .NET, font color changes in a string
In modern .NET do we still alter the changes to the font inline or with a class?Like:         if (strGoal.Equals(""))        {            QueryResult.Text = "You Must Enter a <font color='red'>Goal Name</font> before proceeding";            return;        } Or:        if (strGoal.Equals(""))&...

Color changes AND font changes...
I would REALLY like to change the fonts for calendars just like I do with BG colors. Can I do it by adding something like font-size: 15pt !important in the calendar ICS file? Thanx, zeddock PS. I notice many patches are referenced here. Why is there not a more regular Sunbird release, nightly or weekly? zeddock wrote: > I would REALLY like to change the fonts for calendars just like I do > with BG colors. Can I do it by adding something like > font-size: 15pt !important > in the calendar ICS file? > > Thanx, > zeddock > > PS. I notice ...

Programatically change the font color of a Label in FireMonkey
Hello. I'd like to know how to change the color and the opacity of a Label in firemonkey. In VCL, I just change this properties of the label and it works normally. Anyway in FireMonkey, it looks like I have to change the custom style. How do I do it programatically? Sorry for the lack of knowledge about it. ^_^ Thanks. > Anyway in FireMonkey, it looks like I have to change the custom style. Not since XE3. > How do I do it programatically? Like this: {code} Label1.StyledSettings := Label1.StyledSettings - [TStyledSetting.ssFontColor]; Label1.FontColor := TAlphaC...

How to change tree view's (web control) back color, font color and font size using CSS (Cascading Style Shteets)
Hi All, I have created tree view (web control) but i want to change all the properties of it, through single style sheet. Like all other controls (label, text box and combo box) it's not possible to change all the properties of treeview through single style sheet by including it to the contol ???? Please help........ MAITRAY. Sorry. No external css. but these attributes: DefaultStyle="background:#CCCCCC;border:solid 1px;color:black;font-size:8pt" HoverStyle="color:blue;font-name:Arial" SelectedStyle="c...

FormView control
When a user modifies the value in a textbox in a "EditTemplate" of the Form View, I would like the font color or back color of the text box to change - even before the update is submitted. How can I do that? Thanks. You can add an onchange event to your textbox: onchange="this.style.backgroundColor='yellow';" Or use the onkeyup event as well. You may need to add the handler for this if your textbox box is being created in the client side.Please mark as "answer" if this helped you in anyway. Thanks. here is how I did it:Protected Sub FirstName...

Changing the default font size is VS.net for VB.net
Subject kinda says it all. Surely there must be a way to changing the default font size for the items in the forms. Thanks for the help in advance. Daniel Yes in Tools Options, I believe its Text Editor > Basic. BrianBrian"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4)....

Howto change the font color of just a certain website to my choice of color?
Dear sirs/madams, how do i change the font color of just www.imagefap.com to my choice of colour instead of its uniform red? thanks. orge wrote: > Dear sirs/madams, > > how do i change the font color of just www.imagefap.com to my choice of > colour instead of its uniform red? > > thanks. > > Did you look under Tools, Options, Content, and the Colors button? -- How to Get a Life Difficulty Level: Hard Tip #11: Have ".com" officially removed from behind your name. and Tip #12: Go on a date with someone you didn't meet i...

Change Font Color
How can i change the font color of just the word "email" to blue Response.Write("You have been unsubscribed from " & Request.QueryString("email")) Try with this:Response.Write("You have been unsubscribed from <span style='color: #0000FF'>" & Request.QueryString("email") & "</span>") Hi, You can use <font style="color:Blue;">test</font> But i think better option is to use anchor with mailto option like below <a href="mailto:emailid">emailid</a> the li...

change font colors
Hi guys I changed the background color to dark blue (using the css) and changed all the fonts to light colors (again in css). However there are still some modules/places where the fonts are black. Is there some place I can set the default font color as white in the entire portal. (besides the stylesheet) Also I have been trying to put my DotNetNuke under a different URL that /DotNetNuke but it wont let me. It keeps giving errors. How do I change that? Is there any place where I can get/buy documentation for DotNetNuke. Not only normal documentation but also programming documentation...

Label Color Change
Hi,  I have a label 'lblmyLabel' inside a repeater.  Im just trying to achieve a logic like below but am unsure how to  access the label and whether its written as databinding or databound.thanks for any assistance.   If case = 1lblmylabel.forecolor = red If case = 2lblmylabel.forecolor = blue  From within your repeater's ItemDataBound event write code to use the FindControl method to find your label control. Once you find the label object write your conditional statements to change the forecolor property (or add a "style" attribut...

changing label color
I need help on this. I need to create a label that when clicked it changes color to blue then when clicked again it changes it black.  Try something like this (in the button's click event):  if label1.forecolor="black" then   label1.forecolor="blue"else   label1.forecolor="black"end if David WierMCP/ASPInsiderASPNet101.com - where to look first!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator on the web!(Please 'Mark as Answer' when ...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

Web resources about - changing the font color of a label - asp.net.getting-started

Changing room - Wikipedia, the free encyclopedia
A changing room , locker room , dressing room (usually in a sports, theater or staff context) or changeroom (regional use) is a room or area ...

Beyond Timeline: The Changing Face Of Facebook Ads
Despite the hype, timeline may not be the most exciting, or important change coming on March 30. Expanded advertising opportunities may unlock ...

Robert Scoble - Micromedia, how it's changing what we blog - Facebook
Jeremiah Owyang wrote an interesting piece about micromedia and how it's changing what we do on blogs and how we distribute media (er, ideas, ...

8 Ways the Changing Facebook Home Page Will Affect Application Virality
For developers who live and die by the changes Facebook makes to the way information flows through the service, every little Facebook tweak has ...

Changing Lanes (@chginglanes) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Changing the way business decisions are made
We believe that social data has unlimited value, and near limitless application. Today, we’re taking an important step toward unleashing this ...

The Right and Wrong Reasons for Changing Jobs
... your profile is a clue to the folks at LinkedIn that you’re thinking of switching jobs, so don’t be The Right and Wrong Reasons for Changing ...

We're Changing Our Name (Back) to Stack Overflow
We are Stack Overflow. You may know us from such popular websites as Stack Overflow Q&A, Stack Overflow Careers, The Stack Exchange Q&A Network, ...

The Tao of Twitter: Changing your life and business 140 characters at a time - Amazon
It's time to take the mystery out of Twitter. Twitter may be the most powerful business and personal networking platform ever created but it ...

App Store - Voices 2 ~ fun voice changing!
Read reviews, get customer ratings, see screenshots, and learn more about Voices 2 ~ fun voice changing! on the App Store. Download Voices 2 ...

Resources last updated: 12/11/2015 10:58:55 PM