| > I can't get a simple widget to come up on the screen with the correct
> size and position. My eyes are bloodshot from the manuals and I can
> take no more.
>
> Question 1)
> If you are supposed to be able to specify size and position of a
> widget then why does editing the x and y arguments of the
> following DECburger code not change a thing???
>
> S_MAIN_WINDOW : main_window{
>
> arguments{
> x = 100;
> y = 100;
> width = 0;
> height = 0;
> };
> };
>
> Changing the height and width work peachy, why not x and y????
>
The reason that specifying x & y always specifies the position of a
widget with respect to it's parent. In the case of a main window
its parent is an application shell which ignores the x & y of its
child. What you really want to position is the application shell
which is the parent of the main window. Currently you have to do
this in the C code. I think you can specify an override arg list
on the call to XtInitialize (it is the one that creates the application
shell).
>
> Question 2)
>
> Further RTFM uncovers the magic a XtSetArg so how come it doesn't
> work either????
>
> XtSetArg( arglist[0], DwtNx, 100 ); /* works !!!! */
> XtSetArg( arglist[0], DwtNy, 100 ); /* doesn't !!! booo hsss */
>
>
> Why not???
>
Unless you have a typo, the reason it doesn't work is that you are
filling in arglist[0] twice. You probably want arglist[1] for one
of the calls to XtSetArg. Some people use a variable and specify
varible++ for each reference to the index to eliminate this type of
typo.
>
> Question 3)
>
> After reading famous note 21 on external .dat files I realize this
> not "supported", but anyway, how come in my decw$xdefaults.dat file
> if I have the line
>
> wm*geometry: 1022x50+6+10, the 10 for the y value does bugger
> all (jack shit, in American). You have to crank it up to 23 to see
> any change at all ???
I'm not sure about what the question is here. The wm*geometry line
sets the size and placement of the icon box (wm is for the window
manager). To effect some other application, replace the "wm" with
the name of the application you want to change. Also, I've heard
that the geometry resource is not supported by all applications. Some
require you to specify:
application_name.x: value
application_name.y: value
application_name.width: value
application_name.height: value
Good Luck.
-Jer
|