Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Colors

Reply
Thread Tools

Re: Colors

 
 
Zanna
Guest
Posts: n/a
 
      08-27-2005
"Paul Smith" <> ha scritto nel messaggio
news:43066b16$0$97123$ed2619ec@ptn-nntp-

> I have a button on my web page the backcolor of which I want to change:
>
> btnSample.backcolor = ????????
>
> I want the color to be Gainsboro
>
> However I enter Gainsboro or color.Gainsboro I have the blue wavy line
> indicating an error.


What is the error?

in C# (case sensitive) you need to write

btnSample.BackColor = Color.Gainsboro;

It's really no matther if the value came from the Web palette or it is in
RGB: it's a System.Drawing.Color and this is all you need.

--
..Net Reporting tool: http://www.neodatatype.net


 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      08-27-2005
The problem is that Gainsboro doesn't get converted to an RGB when the code
is delivered to the client. Cascading Style Sheet code is produced with the
color name Gainsboro still intact. The use of the color name in the client
code is producing different colors depending on the client that is receiving
the code. There is no error message.

If you've read this thread, you'll see that the solution is not to use the
color name Gainsboro and to use the RGB value for it instead.

"Zanna" <> wrote in message
news:HDXPe.108672$...
> "Paul Smith" <> ha scritto nel messaggio
> news:43066b16$0$97123$ed2619ec@ptn-nntp-
>
>> I have a button on my web page the backcolor of which I want to change:
>>
>> btnSample.backcolor = ????????
>>
>> I want the color to be Gainsboro
>>
>> However I enter Gainsboro or color.Gainsboro I have the blue wavy line
>> indicating an error.

>
> What is the error?
>
> in C# (case sensitive) you need to write
>
> btnSample.BackColor = Color.Gainsboro;
>
> It's really no matther if the value came from the Web palette or it is in
> RGB: it's a System.Drawing.Color and this is all you need.
>
> --
> .Net Reporting tool: http://www.neodatatype.net
>
>



 
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
Is there any library that can convert RGB colors to ANSI colors? ZelluX Python 3 12-01-2008 11:08 AM
TreeNode colors come from anchor colors AAaron123 ASP .Net 1 08-07-2008 07:56 PM
background colors dimestore Firefox 10 07-16-2005 09:35 AM
Problem with backgrounds &colors balado Firefox 1 02-28-2005 09:04 PM
Background colors Steve IA Firefox 0 11-06-2004 07:44 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57