There is no control over the appearance of the Buttons in the bottom Frame nor is there any way to control the placement of the two +Frames with respect to each other.
So basically, you can change the color of the frames, and the colors of any widgets you add to the top frame. The DialogBox is a "convenience widget", designed to do the task easily. If you want full control over your popup windows, just make your own toplevel window, and withdraw it. Then pop it up when needed. There is a grabGlobal command to make your toplevel grab focus, just like the DialogBox.
#!/usr/bin/perl use warnings; use strict; use Tk; my $tl; my $mw = MainWindow->new; $mw->title( "MainWindow" ); $mw->Button( -text => "Toplevel", -command => \&do_Toplevel )->pack(); MainLoop; sub do_Toplevel { if ( !Exists( $tl ) ) { $tl = $mw->Toplevel(); $tl->geometry('300x100+100+100'); $tl->title( "Toplevel" ); $tl->Button( -text => "Close", -command => sub { $tl->withdraw } )->pack; } else { $tl->deiconify(); $tl->raise(); } } ##############################################################
In reply to Re: perl/tk DialogBox position
by zentara
in thread perl/tk DialogBox position
by mikasue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |