[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1147.0. "Position Pandimonium!!!" by CERN::EJM () Thu Jul 20 1989 14:58

    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????
    
    He stumbles on in the quest for truth....
    
    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???
    
    Finally he sulks back to his corner...
    
    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 ???
    
    
    
    Thanks for your time - sorry to be rude.
    
    John

T.RTitleUserPersonal
Name
DateLines
1147.1Discussed elsewhere, but...EPIK::BUEHLERThe IRS believes in effort: tax yourselfThu Jul 20 1989 22:338
    Using an override argument list on a widget fetch or doing a set values
    after the fetch will work.  Try setting both X and Y in a single
    XtSetArgs.  I haven't gone near the C bindings in a while, so I can't
    say if you've got any syntax problems or anything else obvious like
    that.
    
John

1147.2JER::HARROWPOSIX what?Fri Jul 21 1989 14:2979
>    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

1147.3Other notes on this subject...R2ME2::OBRYANWhen in doubt, let the user decide.Sun Jul 23 1989 22:498
RE:.0

DIR/TITLE=MAIN reveals several notes already entered in this conference on main
windows, with note 376 possessing a discussion of this particular topic.

Happy hunting.