| Author |
Message |
AlexBB

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
MSComctlLib.TreeCtrl.2 does not have BackColor property. Is it possible to define one (it is of course possible) and actually make it functionable
Thanks.
Visual FoxPro1
|
| |
|
| |
 |
Tomik

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
DECLARE LONG SendMessage IN User32 LONG nhWnd, INTEGER Msg, LONG wParam, LONG LPARAM
SendMessage( THISFORM.TreeView1.HWND, 4381, 0, RGB(255,255,192))
|
| |
|
| |
 |
AlexBB

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
Wow!!! Spectacular. It works! You have my admiration for the rest of your life... NO, my life!
And how did you know that this yellowish hue (255,255,192) is my favorite color for background in treeview contols! This is clairvoyance through and through.
It turns out I am not alone, other people have similar feelings. It is somewhat disconcerting to see your information displayed against a listless white background.
Thank you very much.
|
| |
|
| |
 |
MarciaAkins

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
And how did you know that this yellowish hue (255,255,192) is my favorite color for background in treeview contols!
The problem, however, is that this color may be your end user's least favorite color and they absolutely HATE it.
This is why there are settings in the Windows control panel for the user to set up the appearance of her machine the way that she wants it to be.
If I installed an application that insisting on messing sround with my aesthetic sensibiltities, the next thing I would do would be to uninstall it.
|
| |
|
| |
 |
AlexBB

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
Understanding jokes is a gift and cannot be instantiated with AddProperty () method.
|
| |
|
| |
 |
MarciaAkins

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
Understanding jokes is a gift and cannot be instantiated with AddProperty () method.
Regardless of whether or not your were joking about this being your favorite color, I think you totally missed my point.
People set up the color schemes on there computers they way they like them.
Your program is a guest on the user's computer and should behavior accordingly.
FYI, you do not instantiate object using the form's AddProperty() method. You instantiate them using the form's NewObject() or AddObject() methods.
|
| |
|
| |
 |
CetinBasoz

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
For what it is worth, do not play with treeview backcolor.
|
| |
|
| |
 |
AlexBB

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
I never said understanding jokes is an object. It is no object. I think it is a property:)
|
| |
|
| |
 |
AlexBB

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
And why is it so, may I ask
|
| |
|
| |
 |
AlexBB

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
Maybe i should stop filling the cyberspace with personal gibberish but I was not joking on that particular point. It is something to think about. I have filled with similar tint many of my controls. Actually I use this hue (or very close to it) for controls other than treeviews: textboxes, editboxes, comboboxes, etc. I use a slightly bluish color for treeviews traditionally. Still it struck a chord. I will change this color into a bluish part of spectrum later.
|
| |
|
| |
 |
MarciaAkins

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
I never said understanding jokes is an object. It is no object. I think it is a property:)
Not to be pedantic about all this, but you do not instantiate properties, you instantiate objects.
You set properties.
Part of the reason that I nit pick about your choice of words is that they have specific meanings - especially technical words.
If you learn to use these technical terms properly, people who are trying to help you will be able to understand your questions more easily and be in a better position to provide assistance.
|
| |
|
| |
 |
Tamar E. Granor

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
Unless you're the only one who'll be using your applications, you
shouldn't introduce any colors that the user hasn't chosen in the
Windows Display Properties dialog. Doing so raises several problems:
1) The colors you add may be incompatible with the user's Windows colors, resulting in unreadable text;
2) A user may be color-blind and unable to distinguish a color you introduce from what surrounds it;
3) A user may hate a color you like enough to decide that he wouldn't rather not use your application.
In general, applications should simply pick up the user's colors and
apply them, which in VFP, is as simple as doing nothing. If you really
need to do something other than the default, you can use the
GetSysColor() API function to read the user's colors and apply them as
needed.
Tamar
|
| |
|
| |
 |
AlexBB

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
That point had been understood hours ago. I am the only user of my controls. I can paint them in any wild color I wish. I was also excited by the demonstration of the fact that such seemingly opaque and impenetrable control like an OLE treeview can be manipulated internally. I immediately thought of other possibilities I may try.
Incidentally, last week I got your new book "What's bad with nine.." Do they put your picture on the cover
J-u-s-t k-i-d-d-i-n-g.
|
| |
|
| |
 |
CetinBasoz

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
If you are the only user of your controls than it might not matter. Otherwise my basic reason was that it doesn't behave as you expect it to be (even if the user loved the color). You might see what I mean when you add multilevel nodes expanding/shrinking (especially if nodes too have backcolor-you should see white background coming in some places).
|
| |
|
| |
 |
Ian Mellors

|
Posted: Visual FoxPro General, MSComctlLib.TreeCtrl.2 BackColor ??? |
Top |
I think we have the essence of a perfect solution here;
we know how to set the back colour to whatever we want
we know that we should not mess with other ppls colour schemes etc
so use GetSysColor() to get the colour values for a system colour that looks best and use that.
p.s. the issue with the icons and their back colours should not be a problem if you use the same system color as the treeview control and set the mask colour appropriately (magenta is standard I think)
Shame that the MSComctlLib.TreeCtrl.2 control does not have the same funcionality as the imagelist control that allows you to set these colours through the GUI - oh well
|
| |
|
| |
 |
| |