Author Topic: Pdaxrom, Tcl/tk And Maximized Top Level Window  (Read 6180 times)

ivanhoe

  • Newbie
  • *
  • Posts: 4
    • View Profile
Pdaxrom, Tcl/tk And Maximized Top Level Window
« on: May 29, 2007, 04:41:18 am »
Hi,

I'm writing a small app in Tcl/Tk for pdaxrom. I want a main (top level) window to be always maximized in both portrait and landscape screen orientations. Is there any simple way to do it (without hacking Tk sources etc)?

Currently I've found that "wm geometry . [winfo screenwidth .]x[winfo screenheight]+0+0" maximizes main window at start, but I don't know how to catch screen rotation within Tk and get proper geometry to resize my window.

jfv

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
Pdaxrom, Tcl/tk And Maximized Top Level Window
« Reply #1 on: May 29, 2007, 10:26:20 am »
This is a bad hack, but

while {1} {
wm geometry . [winfo screenwidth .]x[winfo screenheight .]+0+0
after 1000
update idletasks
}

might have the desired effect. You can try also deleting and redrawing the window but that might be overkill.
SL 5000 D  and C860 Sharp ROM
Too many accessories...

ivanhoe

  • Newbie
  • *
  • Posts: 4
    • View Profile
Pdaxrom, Tcl/tk And Maximized Top Level Window
« Reply #2 on: May 31, 2007, 01:59:11 am »
Quote
This is a bad hack, but
...
might have the desired effect. You can try also deleting and redrawing the window but that might be overkill.

Unfortunately, it doesn't work. "screenwidth" and "screenheight" remain the same from start of my app.