473,394 Members | 1,797 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,394 software developers and data experts.

How to set control color property to hexidecimal values?

Can some pls provide an example as to how to use the TypeConverter and/or
WebColorConverter class to set a control color property to a hexidecimal
value?

Thanks in advance.
Nov 16 '05 #1
3 3072
hi
if i am not wrong you are looking for this

this.dataGridGroup.SelectionBackColor =ColorTranslator.FromHtml("#666666" );

regards
ansil

"charliewest" wrote:
Can some pls provide an example as to how to use the TypeConverter and/or
WebColorConverter class to set a control color property to a hexidecimal
value?

Thanks in advance.

Nov 16 '05 #2
When i try to use "ColorTranslator" i get an error msg that the type or
namespace cannot be found.

I am using the System.Drawing namespace and the assembly reference is
referenced in my project. I am working w/ .NET CF - does this pose a problem?

my code is: this.lblName.BackColor = ColorTranslator.FromHtml("#66666");

Thanks,

"Ansil MCAD" wrote:
hi
if i am not wrong you are looking for this

this.dataGridGroup.SelectionBackColor =ColorTranslator.FromHtml("#666666" );

regards
ansil

"charliewest" wrote:
Can some pls provide an example as to how to use the TypeConverter and/or
WebColorConverter class to set a control color property to a hexidecimal
value?

Thanks in advance.

Nov 16 '05 #3
Ansil,

Getting back to this issue, your example using the dataGrid control isn't
exactly what i am try to do. I am simply trying to set the background
property of a label control to a specific color in hexidecimal format.

Excuse my ignorance, but i am simply lost w/ your solution. Could you pls
provide more information? My environment is Windows Mobile 2003 developing
using the .NET CF. Thanks!

"Ansil MCAD" wrote:
hi
if i am not wrong you are looking for this

this.dataGridGroup.SelectionBackColor =ColorTranslator.FromHtml("#666666" );

regards
ansil

"charliewest" wrote:
Can some pls provide an example as to how to use the TypeConverter and/or
WebColorConverter class to set a control color property to a hexidecimal
value?

Thanks in advance.

Nov 16 '05 #4

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

Similar topics

2
by: Damon | last post by:
I'm getting errors using XML deserialisation and CDATA sections when there are hexidecimal characters involved. If the CDATA section does not contain a hexidecimal values everything is fine....
6
by: Bruce Rusk | last post by:
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what may be a slight bug in it. I have a lot of non-Western language (Chinese) text in my RTF field, and such records get...
7
by: Jacky Luk | last post by:
Does anyone know of a downloadable Line ActiveX control which allows me to plot straight lines on a VC++.NET form? Thanks Jack
1
by: D. Shane Fowlkes | last post by:
I'm trying to use some basic logic (in a goof off test page) so when a form's data is evaluted, the color of a label **might** be red. The error I keep getting is: Compiler Error Message:...
6
by: Tom Kiefer | last post by:
Question: If I have an ASP.NET User Control which defines/exposes a property that the page can use to specify a mode or data subset for the control to use, is there a way to tell the @OutputCache...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
7
by: Michael Groeger | last post by:
Hi all, I have designed user controls. One search control where I can search for items in the database and show them in a grid. This control also has a button which simply exposes it's click...
3
by: Marty McFly | last post by:
Hello, I have a control class that inherits from System.Web.UI.WebControls.Button. When I drag this control from the "My User Controls" tab in the toolbox onto the form, I want it to reflect the...
10
by: Lars Netzel | last post by:
Hi! I have a property of a Control (a button I'm making) that makes it possible for the user to choose what shape a button should have... Round, Square, Triangle... How do I in the designer...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.