How would I position the Cancel button in my tk DialogBox? By default it is in the bottom and centered. I want it on the bottom and to the right. I read its in a ?widget/frame? called bottom, but I'm not sure how what code to write to get that widget/frame then style/position the button. Thanks! I copied my code below for the dialogbox:
my $dialog = $mw->DialogBox(-title => 'My Dialogue Box!',-buttons =>['
+Continue']);
$dialog->geometry( "400x200" ); #WIDTH x HEIGHT
$dialog->resizable( 0, 0 ); #(0, 0) means not resizable
bottom->Frame(-relief=>'ridge', -border=>1)->pack(-fill => 'x', -padx=
+> 0, -pady=> 0);
$dialog->protocol('WM_DELETE_WINDOW',sub{return;});
my $topDialog_frame = $dialog->Frame(-relief=>'ridge', -border=>1)->pa
+ck(-fill => 'x', -padx=> 0, -pady=> 0);
my $middleDialog_frame = $dialog->Frame(-relief=>'ridge', -border=>1)-
+>pack(-fill => 'x', -padx=> 0, -pady=> 0);
$topDialog_frame->Label(-text=>'Test 1',-font=>'Helvetica 9 bold')->pa
+ck(-anchor=> 'w', -ipadx=> 3, -ipady=> 3,);
$middleDialog_frame->Label(-text=>'Test 2',-font=>'Helvetica 9 bold')-
+>pack(-anchor=> 'w', -ipadx=> 3, -ipady=> 3,);
my $item = $dialog->Show();
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.