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

So, I've been looking into Prima as a replacement for Gtk2, and I'm liking it pretty well, but I'm having a terrible time trying to figure out how to replace Gtk2::ScrolledWindow.

I've looked at the Prima perl source on Github, searched and search with my favorite search engine, and done some experimentation, but I haven't been able to figure it out.

Is there a primer somewhere on adding scrollbars to a widget (and making it clip), or am I just not understanding one of the builtin widgets that will Just Work for this (and if so, how do I call it, because my trial and error on that has not yielded anything but vague error messages)?

Any help will be greatly appreciated.

If desired, I can post the code for my latest failed attempt, but I didn't want to waste time/space here if the case was that I need to use one of the built-ins.

ETA: Seems I can make a TabbedScrollNotebook, but I have to make sure I "use Prima::ScrollWidget" myself, which wasn't clear from the documentation or the error message I was getting when I tried to just make one.

Now, if I can just figure out how to get the scroll area to move the scrollbar on mouse wheel, I'll be a happy camper.

Replies are listed 'Best First'.
Re: Prima scrollbar?
by Athanasius (Archbishop) on Oct 02, 2014 at 06:24 UTC

    Hello over2sd,

    I have Prima on my Windows system, and am able to run the following without problem:

    • The EXAMPLE code given in the Prima::ScrollBar documentation.

    • The script “scrollbar.pl” which came as part of the Prima installation, and which I found in the directory:

      C:\Perl\Strawberry\strawberry-perl-5.20.0.1-64bit-PDL\perl\site\lib\Pr +ima\examples

    If you explain how the functionality demonstrated in these examples falls short of your needs, the monks will likely be in a better position to provide help.

    (Disclaimer: Gtk2 doesn’t install on Windows, so I don’t know exactly what Gtk2::ScrolledWindow does.)

    Hope that helps,

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

      Thank you for your response.

      I looked at the examples, and they do neat things, but not what I wanted.

      ScrollWindow is basically a Box that has a scrollbar, and then when you move the scrollbar or roll your mouse wheel, it moves the viewport of the box up and down, just like the scrollbar in a typical browser window.

      The example code shows how to do things with scrollbars other than using them as scrollbars. Perhaps I was looking at the wrong examples?

Re: Prima scrollbar?
by Anonymous Monk on Oct 02, 2014 at 06:41 UTC