in reply to TK::Dialogbox geometry spec

use Tk; use Tk::Dialog; use strict; use warnings; my $mw = MainWindow->new; $mw->geometry('400x200+20+10'); $mw->Button ( -text=> 'DialogBox', -command=> sub { for my $i (1..10) { my $db = $mw->DialogBox(-title => 'title', -buttons => ['OK', 'Can +cel'], -default_button => 'Ok'); $mw->geometry(sprintf ("%dx%d+%d+%d", 400-$i*10, 200+$i*10, 10+$i* +10, 10+$i*10 )); $mw->update(); $db->geometry(sprintf ("%dx%d+%d+%d", 300+$i*10, 300-$i*10, 30+$i* +10, 30+$i*10 )); $db->update(); $db->Show(); } } )->pack (); MainLoop; 1;
I can't take credit for the solution. It was here at ActiveState's website

Replies are listed 'Best First'.
Re^2: TK::Dialogbox geometry spec
by kayl (Initiate) on Jul 08, 2008 at 23:48 UTC
    The $widget->update doesn't do the trick. And the link talks about querying the widget for its spec. That's not what I'm trying to do.

    The DialogBox *does* size properly to a by b in the "a*b+c+d".

    The DialogBox does not position properly to "in cx" and "down b" in the "a*b+c+d".

    I'd like to know how to get DialogBox not to ignore (c,d).