There is no "maximize" function in Tk. You could however use
your method, which I would use like this:
$main->withdraw();
$main->geometry($main->screenwidth."x".$main->screenheight."+0+0");
$main->deiconify();
$main->raise();
First you minimize the window, then you set the new geometry, after that restore the window and then bring it to front.
--HolyGrail | [reply] [d/l] |
If by "upper-right corner of the window", you mean the buttons at the right end of the title bar, those buttons should be handled by your window manager--in this case NT. Which means that you shouldn't have to code for them at all (and probably shouldn't, since that is likely to introduce irregularities and confuse users).
Is that not happening in your application?
BTW, as a callback or sub what you have looks fine to me-- or did this not work either?
Additional thought: you may want to ensure that you set a height that takes into account the typical size of the menu bar, since otherwise you'll just create a window bigger than the actual screen real estate available. | [reply] |