Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tk::FileSelect - control window width ? 1

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
HI,

How can I control window width with Tk::FileSelect ?
The default browsing window that opens is too narrow,I'd like to have it wider.

Thanks

Long live king Moshiach !
 
Hi MoshiachNow

Below an example where you can control the FileSelect Window size.

Code:
    use strict ;
    use Tk::FileSelect;
    
    my $start_dir = ".";
    my $Fsref = MainWindow->new->FileSelect(-directory => $start_dir,);
    $Fsref->geometry("470x310+300+120");
    $Fsref->minsize(470,310);
    $Fsref->maxsize(470,310);
    $Fsref->MainWindow->withdraw;
    my $file = $Fsref->Show;
    $Fsref->configure(
                    -command=>\&sous($file),
                    -width => 1000
    );
    
    sub sous {
        my $file = $_[0] || '';
        print "myfile = $file";
    }

dmazzini
GSM System and Telecomm Consultant

 
You basically plays with the window size.

Code:
$Fsref->configure(
                    -command=>\&sous($file),
                   # -width => 1000
    );

This width option overhere is not necessary, it does nothing

I hope it helps.

dmazzini
GSM System and Telecomm Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top