G'day aviw,
Welcome to the Monastery.
[As you can see from previous replies,
your post wasn't very clear with respect to what you're trying to achieve
or, indeed, what you've already attempted.
While I appreciate that this is your first post,
you need to understand that we can only provide advice based on the information you give us.
Please provide:
the actual names of modules you're using with links to them;
a short piece of code that reproduces your problem
(and please don't obscure the problem with irrelevant font, colour, border, style, etc. inclusions);
and, especially for GUIs,
a small piece of ASCII art to demonstrate what you hope to finally see can be particularly useful.
See "How do I post a question effectively?", "Writeup Formatting Tips" and "What shortcuts can I use for linking to other information?" for more on these topics.]
My initial thought (and I wasn't alone in this),
was that "PaneWindow" referred to Tk::Pane.
I suspect this isn't what you're using (given it doesn't have a sashPlace() method);
however, it may do what you want.
Try creating a scrolled version (see Tk::Scrolled);
however, don't add actual scrollbars, instead control the scrolling using the xview() method.
Do note that the scrolling functionality is somewhat limited and may not do everything you want.
I suspect "PaneWindow" really referred to
Tk::Panedwindow.
While this does have a sashPlace() method, its
DESCRIPTION states:
"Moving a sash causes the widgets on either side of the sash to be resized."
So it would appear that's not the widget for your needs.
What I think may be the best option for you is Tk::Canvas.
Probably the most relevant options are: -xscrollcommand, -confine,
-height, -scrollregion, -width and -xscrollincrement.
And, similarly, these methods: bbox(), xview(), xviewMoveto() and xviewScroll();
and perhaps even scanMark() and scanDragto().
You'll want to set this up as scrolled but without scrollbars,
controlling scrolling through options and methods
(much as described for Tk::Pane, above).
Tk::Canvas is part of the standard Tk Distribution.
If you run the Widget Demo (just type widget from the command line),
you'll find eight examples in the Canvases section which may give you some ideas.
There are other, user-contributed canvas widgets which may be better suited to your needs:
Tk::WorldCanvas and
Tk::Zinc are two examples you might like to look at
(those are just examples, not recommendations);
or search CPAN for more (there's quite a lot).
If you want vertical scrolling, every -xoption and xmethod() mentioned above
has a complementary -yoption and ymethod().
And, in case you didn't know, Standard Options are described in
Tk::options.
| [reply] [d/l] [select] |
I am not sure that Tk:Pane is what you need or indeed if that is what you are using?
It would be very helpful if you could post a very simple example of code that demos what is going on.
Update: With Tk, I almost always use the pack windows manager (pack of the possibilities of: pack, grid, place). | [reply] |
BUT it rerenders the other frame it holds and that looks ~not cool. what do you mean by that?
| [reply] |
Thank you for the replay.
TOP level:
I mean that what I see is an ugly flashing of re-rendering buttons.
Detail:
To create the sliding window effect I've used a timer with 10 mSec interval to call the function which sets the sashPlace() location.
The sash moves as expected but the re-rendering causing flashing of the elements.
| [reply] |
| [reply] |