Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

how can i create a scrollbar in the main window using perl tk

by Anonymous Monk
on Dec 18, 2008 at 06:25 UTC ( [id://731168]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

how can i create a scrollbar in the main window, using perl tk.
  • Comment on how can i create a scrollbar in the main window using perl tk

Replies are listed 'Best First'.
Re: how can i create a scrollbar in the main window using perl tk
by kutsu (Priest) on Dec 18, 2008 at 07:01 UTC

    Check the documentation, you can find an example at the More Callbacks link.

Re: how can i create a scrollbar in the main window using perl tk
by imrags (Monk) on Dec 18, 2008 at 07:16 UTC
    Hi, You can use "use Tk::Scrolled"; and then followed by something like this
    my $mw = MainWindow->new(); my ($listbox) = $mw->Scrolled('Listbox',-height=>0, -width=>0, -scroll +bars => 'se')->pack();
    Njoi
    Raghu
      I dont want to associate any widget(listbox) to the scrollbar. I just want to have a scrollbar that will appear in the main window when it is populated, e.g with other frames (containing widgets like table, entry) that appears on the main window after pressing some buttons on the main window and disappears, pressing those buttons again. Any help !! Thanks in Advance.
        Then you can try something like this:
        $mw->Scrollbar()->pack(-side => 'right', -fill => 'y');
        And then you can associate it with any widget. Check out: PerlTK
        Njoi
        Raghu

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://731168]
Approved by kutsu
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found