[comp.windows.x] Setting colours through xrdb

shmulevi@haapana.tut.fi (Shmulevich Ilya) (09/19/90)

I tried setting colours using xrdb. In particular, I tried setting colours for
xclock. I tried certain statements like xclock*Border: red    for example.
But it did not work. Also, I tried xclock*Foreground, but surprisingly -
it worked! *border also did not work. So, what I am trying to say is
that I can't figure out what the pattern is for defining colours. Some
work and some don't. How come?

thanx,

Ilya Shmulevich
shmulevi@tut.fi

converse@EXPO.LCS.MIT.EDU (09/19/90)

> In particular, I tried setting colours for
> xclock. I tried certain statements like xclock*Border: red    for example.
> But it did not work. Also, I tried xclock*Foreground, but surprisingly -
> it worked! 

You were using an incorrect resource class name for the border color.
The documentation for this is given in the X man page, under the heading
"Resources".  

If the correct resource specification doesn't work, look in the 
documentation for your window manager.  Some window managers override
the X Toolkit Intrinsics method of border color specification with their
own methods, and in this case, you will have to set the border color
through the window manager.  


Donna Converse
converse@expo.lcs.mit.edu

envbvs@epb2.lbl.gov (Brian V. Smith) (09/19/90)

In article <1990Sep19.141423.26912@funet.fi>, shmulevi@haapana.tut.fi
(Shmulevich Ilya) writes:
|> 
|> I tried setting colours using xrdb. In particular, I tried setting colours
for
|> xclock. I tried certain statements like xclock*Border: red    for example.
|> But it did not work. Also, I tried xclock*Foreground, but surprisingly -
|> it worked! *border also did not work. So, what I am trying to say is
|> that I can't figure out what the pattern is for defining colours. Some
|> work and some don't. How come?

Usually the window manager has the last say about the color of window 
borders.  See the man page for your particular window manager to find out
if you can change border colors of certain windows.

--
Brian V. Smith    (bvsmith@lbl.gov)
Lawrence Berkeley Laboratory
I don't speak for LBL; they don't pay me enough for that.

rlh2@ukc.ac.uk (Richard Hesketh) (09/20/90)

In article <1990Sep19.141423.26912@funet.fi> shmulevi@tut.fi writes:
>
>I tried setting colours using xrdb. In particular, I tried setting colours for
>xclock. I tried certain statements like xclock*Border: red    for example.
>But it did not work.

Whilst most window managers reparent their clients and override the borders
the other problem you have here is that you are not specifiying the border
colour properly there is no "Border" but there is a "BorderColor" and
"borderColor".

As to where you find out these things .. well to start with there's the
manual page failing that there's the Programming manual for the
widget set / toolkit that the programmer used and of course the source code!
Its also handy if you have a guru hanging around as well 8-)