in reply to Best GUI package for Perl ?
As far as appearance goes, you can put as much into it as you want. There is nothing stopping you from making your own custom file dialogs, based on a canvas or dirtree in a toplevel widget. You can make the dialog look like anything you want.
As an example, here is the beginning of a custom file dialog, which looks "pro". You just need to "flesh it out".
#!/usr/bin/perl use strict; use Tk; require Tk::DirTree; require Tk::Adjuster; require Tk::TList; # The initial directory my $initial_dir = '/'; # The main window... my $main = new MainWindow( -title => 'Explorer)' ); # A frame for the tree, adjuster and tlist my $tree_adj_tablist = $main->Frame(); $tree_adj_tablist->pack( -expand => 'yes', -fill => 'both', -side => 'top' ); # A scrolled directory tree my $tree = $tree_adj_tablist->Scrolled( 'DirTree', -width => 35, -height => 25, -scrollbars => 'osoe', -background => 'White', -selectmode => 'single', -selectbackground => 'DarkBlue', -selectforeground => 'White', -showhidden => 1, -directory => $initial_dir ); $tree->pack( -expand => 'yes', -fill => 'both', -padx => 2, -pady => 2, -side => 'left' ); # An adjuster my $adjuster = $tree_adj_tablist->Adjuster( -widget => $tree, -side => 'left' ); $adjuster->pack( -side => 'left', -fill => 'y' ); # A scrolled tab_list widget my $tab_list = $tree_adj_tablist->Scrolled( 'TList', -background => 'White', -orient => 'vertical', -selectmode => 'extended', -scrollbars => 'os' ); $tab_list->pack( -expand => 'yes', -fill => 'both', -padx => 2, -pady => 2, -side => 'right' ); # A Quit button (will be suppressed???...) my $quit = $main->Button( -text => 'Quit', -underline => 0, -width => 6, -command => sub { exit } ); $quit->pack( -side => 'right', -padx => 10, -pady => 10 ); # Configuring tree and tab_list widgets... $tree->configure( -browsecmd => sub { list_dir( $tab_list, @_ ); } ); # We list the content of the initial dir inside the tab_list list_dir( $tab_list, $initial_dir ); MainLoop(); #--------------------------------------------------------------------- +------- # Displays Dirs and files in TList widget sub list_dir { my ( $tab_list, $path ) = @_; # Erase the TList content $tab_list->delete( 0, 'end' ); opendir MY_DIR, $path or return; foreach my $file ( sort readdir(MY_DIR) ) { # Do not display '.' and '..' next if ( $file eq '.' or $file eq '..' ); # Insert the files in the TList $tab_list->insert( 'end', -text => $file ); } closedir MY_DIR; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Best GUI package for Perl ?
by Eyck (Priest) on Jul 26, 2004 at 11:52 UTC | |
|
Re^2: Best GUI package for Perl ?
by Juerd (Abbot) on Jul 25, 2004 at 13:55 UTC | |
by castaway (Parson) on Jul 26, 2004 at 05:27 UTC | |
by Juerd (Abbot) on Jul 26, 2004 at 07:22 UTC | |
by zentara (Cardinal) on Jul 26, 2004 at 14:25 UTC | |
by Juerd (Abbot) on Jul 27, 2004 at 07:41 UTC | |
by demerphq (Chancellor) on Jul 29, 2004 at 23:59 UTC | |
by itub (Priest) on Jul 30, 2004 at 00:50 UTC | |
by Juerd (Abbot) on Aug 01, 2004 at 10:19 UTC |