if(not defined $G) { $G = $mw->DialogBox(title => "List", -buttons => ["Edit/Save", "Add Picture", "Exit"], -default_button=>"Exit", -cancel_button=>'Exit', -command=>\&handle_display_button); # lots of code here my $img2 = $mv->Photo('resized'); $G->Label(-image=>'resized', -height=>400, -width=>600)->place(-x=>20, -y=>190); $lft= $G->Button(-image=>'left', -command=>[\&change_picture, 'down'], -relief=>'flat')->place(-x=>0, -y=>350); $rr = $Gems->Button(-image=>'right', -command=>[\&change_picture, 'up'], -relief=>'flat')->place(-x=>620, -y=>350); $scale = $G->Scale(-from=>0, -to=>$#Search_List, -variable=>\$sb_idx, -command=>\&Change_Record, -orient=>'horizontal', -length=>540)->place(-x=>50, -y=>600); # $G->positionfrom('program'); $G->geometry('650x680+0+0'); # $G->geometry('+0+0'); $G->minsize(650,680); $G->maxsize(650,680); } $G->Show;