Calculating X-resource names 
Author Message
 Calculating X-resource names

Well, this one has me stumped:  What I'd like to do is similar to
the common "customizer" tools that edit your .Xdefaults for you.
E.g., the motif "Custom" menu, which opens a window that lets you
select all sorts of window things and set the default values; it
reaches out and modifies your .Xdefaults so that the changes happen
the next time.

As for the wish scripts, what I'd really like to do is have the user
point at something, and present a few entry items that can fill in
assorted things about that something.  One important thing is the
item's color.  Now, I  know how to do [.x find withtag current], and
that works fine.  But what I don't know is how to calculate from the
tag what the object's color will be called in the .Xdefaults file.
In fact, I've done a bunch of experiments with resource names, and
I've been rather baffled by why a given .Xdefaults entry changes the
things that it does.  For instance, I have a window with a menu frame
.mbar and a canvas .map that are packed vertically.  I made entries
in .Xdefaults that say:
  *map*background:    navy
  *mbar*background:   grey50
Then when I do the usual "xrdb -merge <.Xdefaults", and start the
script, both .mbar and .map come up grey50.  This strikes me as a
bit counterintuitive; the way I read the manual, .map should be
have a navy background and .mbar should have a grey50 background.

So obviously I don't understand something here.  It occurs to me
that with all the [info ...] and [winfo ...] and so on, that there
just might be a way to get tcl to tell me what should be before the
colon in the .Xdefaults line.  Does anyone know if this is doable,
and if so, how?  Is there some way I can use (w)info to give me the
X-resource name of a tag or widget or frame or ...?

Mon, 10 Nov 1997 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. .Xresources/.Xdefaults resource specifications

2. Find resources and resource name


4. Resource Names

5. visa resource name constant confusion

6. VISA resource name constant

7. VISA Find function to VISA Resource Name

8. Functional difference between VISA resource name ASRL1::INSTR and COM1

9. visa resource name control and application builder

10. Accessing arbitrarily named resources

11. resource names??

12. physicial option database (.Xdefaults,.Xresources)


Powered by phpBB® Forum Software