Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: (bbfu) (fullscreen considerations) Re3: Center a Tk window on the screen

by {NULE} (Hermit)
on Jan 04, 2003 at 22:45 UTC ( #224324=note: print w/replies, xml ) Need Help??


in reply to (bbfu) (fullscreen considerations) Re3: Center a Tk window on the screen
in thread Center a Tk window on the screen

Yeah - that's fine. I was going to put something in the help about how you could turn autohide on if you want to use fullscreen. At any rate, it's nice to have the option, for those that don't mind tweaking things a bit to use it.

This is what I ended up using and it works well, excluding the stay-on-top thing (tested on SuSE 8.0 (5.6.1) and Win98 (ActiveState-5.8.0):

if ($s->{fullscreen}) { $s->{fullscreen} = 0; $w->{main}->withdraw; $w->{main}->update; $w->{main}->overrideredirect(0); $w->{main}->geometry($s->{windowed}||"800x600+20+20"); $w->{main}->deiconify; $w->{main}->update; } else { $s->{fullscreen} = 1; $s->{windowed} = $w->{main}->geometry; $w->{main}->withdraw; $w->{main}->update; $w->{main}->overrideredirect(1); $w->{main}->geometry($w->{main}->screenwidth."x".$w->{main}->scree +nheight."+0+0"); $w->{main}->deiconify; $w->{main}->update; }
{NULE}
--
http://www.nule.org
  • Comment on Re: (bbfu) (fullscreen considerations) Re3: Center a Tk window on the screen
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://224324]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2016-09-25 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (472 votes). Check out past polls.