|
From: Kevin W. <kw...@co...> - 2015-02-16 03:14:06
|
Hi Torsten,
Glad resizing no longer crashes your app. :-)
On 2/15/15 6:06 PM, Torsten Berg wrote:
> But there is another thing. When the vertical scrollbar is in the �empty� state, i.e. the content is not so large that scrolling is enabled and the gray bar is not shown, then it seems the widget collapses into a small quadrate as if ignoring any -sticky or -fill options. Try to run this script displaying a listbox with vertical and horizontal scrollbar attached:
I saw what you have described during the development of the new scroll
implementation. During those times it seemed that the system couldn't
correctly calculate the bounds of the scrollbar and so shrank to that
minimal rect.
I'm a bit surprised to see it now. I can certainly say that it does not
show up in other cases where the entire view is visibile, thus not
requiring a scrollbar; the scroll trough is drawn correctly, without
scrollbar. For instance, if I rewrite the code you presented as a simple
UI with a listbox and a scrollbar packed in a frame, the scrollbar
renders as expected. The example you presented, with all of its gridding
and vars and child widgets, was so complicated that I didn't understand
what it was, originally.
I can't say exactly what it causing the issue in your example; the
HITheme scrollbar was so difficult to implement that I am not likely to
dig into what is, essentially, a cosmetic issue. Even in your example,
the scrollbar comes back as required if the window is resized. And the
issue is not evident at all if you use a simpler layout.
My own example is below for your reference. --Kevin
frame .f
pack .f -fill both -expand yes
listbox .f.list
pack .f.list -fill both -expand yes -side left
ttk::scrollbar .f.scroll -command [list .f.list yview]
pack .f.scroll -side right -fill y -expand no
.f.list configure -yscrollcommand [list .f.scroll set]
# insert some data:
for {set i 0} {$i < 20} {incr i} {.f.list insert end $i}
--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
|