RE: Problem with Scrolled Listbox in a LabFrame on MSWin32
"Town, David" <[email protected]> Wed, 29 Nov 2006 09:17:55 -0500
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <A1E953027E21E940858E9FD7D2A6480C145972@uspitsmsgusr09.win.marconi.com> |
> I have a Scrolled Listbox inside a LabFrame which is inside a DialogBox.
If
> I populate the Listbox with a list that does not require a scrollbar (pop
up
> the DialogBox and close it) and then populate the Listbox with a list that
> does require a scrollbar (pop up the DialogBox) the scrollbar appears like
> there is nothing to scroll. If I change the LabFrame to a Frame, the
> problem does not happen. If I replace LabFrame.pm (v4.010) with
LabFrame.pm
> (v3.021) from Tk 800.024, the problem does not happen. The problem also
> does not seem to happen on Linux or Solaris, only MSWin32.
>
> Any suggestions?
>
>Is this the old problem often described for example here:
>http://groups.google.com/group/comp.lang.perl.tk/browse_thread/thread/8fa6a
8a9909ef387/26d147415f4ba682
?
I do not think it is related to the above old problem. Everything worked
fine with Tk 800.024, it was only after upgrading to 804.027 that I noticed
this problem.
>Or maybe it's somehow related to this bug report:
>http://sourceforge.net/tracker/index.php?func=detail&aid=1305128&group_id=1
2997&atid=112997
Maybe related to this problem?
I do not know if LabFrame is to blame, but if I replace the LabFrame.pm
module included with 804.027 with the one from 800.024, I do not see the
problem. I tried to "regress" the 804.027 LabFrame.pm by sequentially
changing code back to how it looked in 800.024, but I did not find a
specific line of code that made a difference without completely reverting.
I did find a "hack" the works around my problem. I will use this for now.
I added the following code:
$list->after(1,
sub {
$list->yview('scroll', 1, 'units');
$list->yview('scroll', -1, 'units');
}
);
I put this code in after updating the contents of the Listbox but before
calling the Show() method on the dialog box.
-David
--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/ptk