perl/tk demos/examples 
Author Message
 perl/tk demos/examples

Howdy, I am looking for some butt-simple examples of using the canvas with
two scrollbars in perl/Tk.  For some reason when I try

my $main = new MainWindow;

$canvas=$main->Canvas();
$x_scroll=$main->Scrollbar(-orient => 'horizontal',
                           -command => ['xview',$canvas]
                           )->pack(-fill => 'x',-side=>'bottom');
$y_scroll=$main->Scrollbar(-orient => 'vertical',
                           -command => ['yview',$canvas]
                           )->pack(-fill => 'y',-side =>'right');
$canvas->configure(-xscrollcommand =>['set',$x_scroll]);
$canvas->configure(-yscrollcommand =>['set',$y_scroll]);
$canvas->configure( -height =>500);
$canvas->configure( -width => 500);
$canvas->pack();

$main->Label(-text => 'Hello World!'
             )->pack;
MainLoop;                    # This is the line 57 refered to in the
                             # error.

It tells me
Use of uninitialized value at disp01.pl line 57.
Dubious call 'set' (obj=)
stack (3):
 0 0x1ba308   PV f=00000804 undef(1t)
 1 0x1ba254   NV f=06060806 f=02020802 0(1t)
 2 0x1ba260   NV f=06060806 f=02020802 1(1t)
Abort (core dumped)

--
Vegetarian   Computer Engineer   Boingoloid  Weight Lifter   Rock Climber
                         PGP available upon request



Mon, 15 Mar 1999 03:00:00 GMT  
 perl/tk demos/examples


Quote:

>Howdy, I am looking for some butt-simple examples of using the canvas with
>two scrollbars in perl/Tk.  For some reason when I try

Run widget demo program, select item #7 under Canvas examples:

        'A simple scrollable canvas'

Then 'View Code'.



Tue, 16 Mar 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. floor.pl example in tk-demos

2. New to PerlTk - Gui design example/demo?

3. Demo programs/examples/tutorials and a simple question!

4. Perl 5.001 + Tk: broken demo, broken evaluation?

5. Tk demos in the Perl Journal # 6

6. Tk widget demo crash

7. Tk-b8 basic demo (+ installing packages, in general)

8. Tk-b9.01 demo errors

9. Tk-b8 basic demo (+ installing packages, in general)

10. Tk demo scripts: what is "dpos"??

11. Tk Table demo required

12. TriD Tk demo

 

 
Powered by phpBB® Forum Software