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

C#, ugly Blue

HI.

When I select a Node in my TreeView, It selected in blue. How can I change
it ?
Jul 21 '05 #1
6 1770
On Mon, 26 Apr 2004 16:05:51 +0200, "Mathieu Chavoutier"
<No****@NoSpam.org> wrote:
HI.

When I select a Node in my TreeView, It selected in blue. How can I change
it ?

The selected color is a system user setting and, as such, should
probably be left as the user has chosen. If you really feel you
*must* override the user's setting, you can subclass the WM_CUSTOMDRAW
message for the control and draw the selection in whatever color you
choose.

HTH,
Bryan
__________________________________________________ __________
New Vision Software "When the going gets weird,"
Bryan Stafford "the weird turn pro."
al******************@mvps.org Hunter S. Thompson -
Microsoft MVP-Visual Basic Fear and Loathing in LasVegas
Jul 21 '05 #2
On Mon, 26 Apr 2004 16:05:51 +0200, "Mathieu Chavoutier"
<No****@NoSpam.org> wrote:
HI.

When I select a Node in my TreeView, It selected in blue. How can I change
it ?

The selected color is a system user setting and, as such, should
probably be left as the user has chosen. If you really feel you
*must* override the user's setting, you can subclass the WM_CUSTOMDRAW
message for the control and draw the selection in whatever color you
choose.

HTH,
Bryan
__________________________________________________ __________
New Vision Software "When the going gets weird,"
Bryan Stafford "the weird turn pro."
al******************@mvps.org Hunter S. Thompson -
Microsoft MVP-Visual Basic Fear and Loathing in LasVegas
Jul 21 '05 #3
you can set the public property of TreeNode's BackColor into the needed
value

--
Vladimir Scherbina
Ukraine, Kiev.
--

"Mathieu Chavoutier" <No****@NoSpam.org> wrote in message
news:u9*************@TK2MSFTNGP11.phx.gbl...
HI.

When I select a Node in my TreeView, It selected in blue. How can I change
it ?

Jul 21 '05 #4
you can set the public property of TreeNode's BackColor into the needed
value

--
Vladimir Scherbina
Ukraine, Kiev.
--

"Mathieu Chavoutier" <No****@NoSpam.org> wrote in message
news:u9*************@TK2MSFTNGP11.phx.gbl...
HI.

When I select a Node in my TreeView, It selected in blue. How can I change
it ?

Jul 21 '05 #5

"Vladimir Scherbina" <vl******@pds-s.local> a écrit dans le message de
news:uS**************@TK2MSFTNGP09.phx.gbl...
you can set the public property of TreeNode's BackColor into the needed
value


Nop, the BackColor is the color of Background, not the color of selection.
I have try your solution, and all my tree was Pink :o) (always use uncomon
color to find easily the affected zone)

Thanks anyway.
Jul 21 '05 #6

"Vladimir Scherbina" <vl******@pds-s.local> a écrit dans le message de
news:uS**************@TK2MSFTNGP09.phx.gbl...
you can set the public property of TreeNode's BackColor into the needed
value


Nop, the BackColor is the color of Background, not the color of selection.
I have try your solution, and all my tree was Pink :o) (always use uncomon
color to find easily the affected zone)

Thanks anyway.
Jul 21 '05 #7

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

Similar topics

9
by: Pedro Graca | last post by:
<?php function ugly_array() { return array(1, 2, 3, 4, 5); } $arr = ugly_array(); echo $arr; ?> not so ugly :) now ... I want to get rid of the $arr temporary variable.
6
by: Quick Function | last post by:
Hi, I developed a site and used css. I put almost all style information in the css and used a lot of "id=my_css_class" in the html. They is little style specification in the html. I found that on...
3
by: Eric Lilja | last post by:
Hello, I recently saw code like this: $ cat t.h namespace nc{ template<typename T> class Base { T hello; protected:
5
by: yxq | last post by:
Hello I am using VS.Net 2002, my icons of XP type look ugly, and i have saw the article. i have added the manifest file. Sometime the icons show very good, but sometime the icons look very...
5
by: adh | last post by:
Winforms Datagrid Qoute (MSDN): Expanders are displayed in each parent row that contains a child table. Clicking an expander generates a list of Web-like links to the child tables, which when...
2
by: Gregory Gadow | last post by:
The TabControl that shipped with .NET 2.0 is seems to be buggier than dog droppings in high summer. Among several complaints, the tabs themselves look horrifically ugly when their pages have the...
5
by: Frederick Gotham | last post by:
I have a typedef in a base class, and I want it to effortlessly filter through to the derived class. Here's a quick example: class Base { public: typedef unsigned SpecialType; };
7
by: teo | last post by:
I have to validate the user input to prvent HTML injection. I use validateRequest=True and when a potentially malicious input occurs AspNet immediately sends its ugly page about the...
5
by: Jim Langston | last post by:
I've been working on a project to map a MySQL database to a C++ class. Well, I actually got it to work, but some if it I just feel is exceptionally ugly. For example, in my operator<< override: ...
20
by: benhoyt | last post by:
Hi guys, I've been using Python for some time now, and am very impressed with its lack of red tape and its clean syntax -- both probably due to the BDFL's ability to know when to say "no". ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.