-geometry on the command line or in .Xdefaults file??!? 
Author Message
 -geometry on the command line or in .Xdefaults file??!?

I've been trying to get my perl/Tk application to recognize a user defined
geometry.  Either on the command line as a -geometry argument, or even simpler -
in the .Xdefaults file.  Nothing I do seems to work.  Is there some flag or
something that needs to be set in the application to allow the user to specify
geometry? None of my other .Xdefault options for that application have a problem
(mostly colors for buttons and such).  Also - does Tk automagically grab the
command line somehow or is that something I have to explicity do myself in the
app?

-Nancy
--



Sun, 15 Nov 1998 03:00:00 GMT  
 -geometry on the command line or in .Xdefaults file??!?


Quote:

>I've been trying to get my perl/Tk application to recognize a user defined
>geometry.  Either on the command line as a -geometry argument, or even simpler -
>in the .Xdefaults file.  Nothing I do seems to work.  Is there some flag or
>something that needs to be set in the application to allow the user to specify
>geometry? None of my other .Xdefault options for that application have a problem

Perhaps it's your window manager:  some won't honor -geometry.  Seems to work
for me here.

Quote:
>(mostly colors for buttons and such).  Also - does Tk automagically grab the
>command line somehow or is that something I have to explicity do myself in the
>app?

There was at one time *something* that grabbed common X command line options,
but I forget what it's called!  I'll have to dig around.  It may have been
part of MainWindow().

I use my own fancy Getopts, Evaluate Parameters, others just use the one of
the distributed Getops...



Mon, 16 Nov 1998 03:00:00 GMT  
 -geometry on the command line or in .Xdefaults file??!?

Quote:

> I've been trying to get my perl/Tk application to recognize a user defined
> geometry.  Either on the command line as a -geometry argument, or even simpler -
> in the .Xdefaults file.  Nothing I do seems to work.  Is there some flag or
> something that needs to be set in the application to allow the user to specify
> geometry? None of my other .Xdefault options for that application have a problem
> (mostly colors for buttons and such).  Also - does Tk automagically grab the
> command line somehow or is that something I have to explicity do myself in the
> app?

The latter.

my $mw = MainWindow->new;
$mw->CmdLine;

Only these options are handled:

 my $result = GetOptions('iconposition=s',
                         'geometry=s',
                         'title=s',
                         'fg=s','foreground=s',
                         'bg=s','background=s',
                         'fn=s','font=s',
                         'iconic!','motif!');

See Tk-b*/Tk/MainWindow.pm

As for using Xdefaults. The problem here is that most Tk apps
use 'pack' and that normally sets size of MainWindow based
on contents - after any defaults setting of width/height has occured.
Probably could be done....

Quote:

> -Nancy
> --




Wed, 18 Nov 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Parse command-line options (ie -geometry)

2. Write an Xdefaults file?

3. How to send attachment file in command line in HP-UX 11.00

4. how to operate cgi from command line or from perl file

5. Specifying *.txt as the input file on the command line

6. command-line args style flags from a file

7. Command Line Debug of CGI.pm program when a file upload is involved

8. how to implement files with wildcard in command line

9. Passing Command Line Parameters cgi file

10. command line file operations

11. Entire File Contents from Command line

12. Command line file editing/substitution

 

 
Powered by phpBB® Forum Software