Gtk/Perl Viewport question



Hello all,
    I am currently writing a program in
perl using gtk and I want to use the
viewport directly (the scrolling will be
automated, like a ticker or
something).  Well, I am in just the
first stages of the coding the interface
and I can't figure out the correct
syntax to initialize the viewport.  I
tried to use something like

  $viewport_window = new Gtk::Viewport(
undef, undef );

because a scrolled window is

  $scrolled_win = new
Gtk::ScrolledWindow(undef, undef);

and I figured they should have similiar
arguements.  I have looked all around,
and so far the biggest hint of what to
do came from perl's debugging statement,
"Usage: Gtk::Viewport::new(Class,
hadjustment, vadjustment) at my_file.pl
line XX."  I can't really figure out
what a valid Class would be and how best
to declare it (and that is if I am
interpreting the error correctly ;) ).
If someone could post a couple lines of
code, it would be greatly appreciated.
    Before I get off the soapbox, I
would also like to verify my theory in
actually making the thing scroll. . .
once I had the viewport, I would get its
horizontal adjustment, pull it apart,
and then increment the 'value' in it,
then set the adjustment, all in a while
loop, right?

    Thanks a lot for your time,
        Michael Benedict.
--
to understand recursion, you must first
understand recursion




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]