use strict; use warnings; use Tk; use Tk::ProgressBar; my $mw = MainWindow->new(); my $percent_done; my $UserMessage; my $PagingMessage="10 of 20"; my $UserMessage="this is my user message"; $mw->Label( -anchor => 'w', -relief => 'flat', -textvariable => \$UserMessage, )->pack(-side => 'left', -expand => 0 , -fill =>'both'); my $FramePaging = $mw->Frame()->pack(-side=>'left', -padx=>20, -fill=>'none' ); my $ButtonPagingNext = $FramePaging->Button( -text=> " Next > ", )->pack(-side => 'right', -anchor=>'center', -expand => 1 , -fill =>'both'); my $WidgetShowPaging = $FramePaging->Label( -anchor => 'w', -relief => 'flat', -textvariable => \$PagingMessage, )->pack(-side => 'right', -anchor=>'center', -expand => 1 , -fill =>'both'); my $ButtonPagingPrevious = $FramePaging->Button( -text=> " < Previous ", )->pack(-side => 'right', -anchor=>'center', -expand => 1 , -fill =>'both'); $mw->ProgressBar( -width => 20, -length => 200, -anchor => 'w', -from => 0, -to => 100, -blocks => 1, -colors => [0, '#93ff66', 50, '#ffff66' , 80, '#dc143c'], -variable => \$percent_done )->pack(-side=>'right', -padx=>5, -pady=>5, -fill=>'x' ); $mw->MainLoop();