T.R | Title | User | Personal Name | Date | Lines |
---|
2446.1 | Just a thought... | GSRC::WEST | Variables don't, Constants aren't | Wed Mar 14 1990 21:31 | 16 |
|
If you want a consistent color scheme, i.e. all backgrounds black and all
foregrounds white, then you could do something that I've done to solve a
situation like this.
Create/Replace the ResourceManager atom on the root window with the
following resources:
*Background: Black
*Foreground: White
These will in a sense become the default colors for the widgets. This
worked for me and I can not be sure that this will work for all widgets.
Maybe someone can elaborate on this.
-=> Jim <=-
|
2446.2 | How... | KAOU35::DLEROUX | | Thu Mar 15 1990 11:28 | 17 |
|
> Create/Replace the ResourceManager atom ...
How do I do this? I have never tried to change resources before and it
isn't very well documented.
Here's what I tried :
char *property_data[] = { "*Background: White", "*Foreground: Black" };
XChangeProperty( conn[0].display, XRootWindow( display,
XDefaultScreen( display ) ),
XA_RESOURCE_MANAGER, XA_RESOURCE_MANAGER, 16,
PropModeReplace, property_data, 2 );
I do this after my call to XtInitialize.
|
2446.3 | Ignore ... | KAOU35::DLEROUX | | Thu Mar 15 1990 11:37 | 6 |
|
Ignore my last request. I got it working.
Thanks,
Dan
|
2446.4 | | TRNSAM::HOLT | Robert Holt, ISV Atelier West | Thu Mar 15 1990 17:19 | 4 |
|
so, what worked?
|
2446.5 | | AITG::DERAMO | Dan D'Eramo, nice person | Thu Mar 15 1990 18:37 | 5 |
| This doesn't strike me as very polite, unless after
creating your widget hierarchy you restore the former
value of the property.
Dan
|
2446.6 | ... | GSRC::WEST | Variables don't, Constants aren't | Thu Mar 15 1990 23:26 | 21 |
| RE: .5
True...In my case we have a single environment and needed to control it
globally. To be (as close to as possible) a good client :^) you should
first retrieve and store the original property.
RE: .? (Can't remember now...must be old age)
The reason his first call didn't work and how he (just guessing) got it
to work was that two of the parameters were in error.
The format supplied was 16 when it should have been 8 since we are dealing
with string (character) data, so only 8 bits is needed. The other parameter
is NumElements. The value 2 was supplied when the actual value is the number
of characters in the resource. For instance, if the resource is
"*Background: Black"
then NumElements should be 18.
-=> Jim <=-
|
2446.7 | What I did ... | KAOU35::DLEROUX | | Fri Mar 16 1990 08:38 | 24 |
|
re 5.
True...
I won't use this method for several reasons. First, it has
unpredictable results on the other displays. Second, as you mentioned
it is not very polite.
It also turns out that I no longer need to do this since the "bug"
or "missing feature" which required this workaround is fixed in
5.4-EFT.
re 4.
Here's my code :
char *property_data[] = { "*Background: White\n",
"*Foreground: Black\n" };
XChangeProperty( display, XRootWindow( display,
XDefaultScreen( display ) ),
XA_RESOURCE_MANAGER, XA_STRING, 16,
PropModeReplace, property_data, 38 );
Dan
|