Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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

by bbfu (Curate)
on Jan 04, 2003 at 20:02 UTC ( #224303=note: print w/replies, xml ) Need Help??

in reply to Re: Center a Tk window on the screen
in thread Center a Tk window on the screen

Of course, if you're running it in MS win32, you should be aware that any "stay on top" windows (such as the taskbar and, on my computer anyway, Trillian) will still be in front. You'll have to do something using Win32 or Win32::API to move them to the back, probably. Although, it's possible Tk has some way to force a z-order for your window (I haven't checked).

Black flowers blossum
Fearless on my breath

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

Replies are listed 'Best First'.
Re: (bbfu) (fullscreen considerations) Re3: Center a Tk window on the screen
by {NULE} (Hermit) on Jan 04, 2003 at 22:45 UTC
    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; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://224303]
Corion gives up
[Discipulus]: ah! so you mean if i need a static image i can use Twig, if on the fly better css selector and mody attrs (jquery?), rigth?
[LanX]: not sure what you guys are taking about, but a DOM manipulation in JS shouldn't be difficult
[Corion]: Discipulus: Yeah, that's what I would try (but so far, I can't even change the colors manually in the SVG, which is why I gave up ;) )
Discipulus bad sign..
[Discipulus]: italian doc says to modify somehow the initial SVG before using it with D3.js
[Discipulus]: LanX the fact is that my js ability is even poorer than my Perl one..
[LanX]: oh its negative? ;P

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (13)
As of 2017-03-23 09:45 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (285 votes). Check out past polls.