|
From: Torsten B. <be...@ty...> - 2015-02-16 07:34:05
|
Hi Kevin,
I can reproduce that your example works. We do not need the vars and grid ding at all, you are right. I just more or less copied the relevant part of the code from my application. Now, just add these 3 lines to sour example:
ttk::scrollbar .f.scrollx -orient horizontal -command [list .f.list xview]
pack .f.scrollx -side bottom -fill x
.f.list configure -xscrollcommand [list .f.scrollx set]
Then, the bug occurs again (you do not even need the 3rd line). So, only when both vertical AND horizontal scrollbars are present, it is exposed. It does also NOT show up when just resizing (= enlarging) the window and keeping the mouse pointer outside the vertical scrollbar area. But as soon as you move the pointer into the vertical scrollbar area, the trough collapses (but of course only when you have a horizontal scrollbar at the same time. E.g. having two vertical scrollbars does not show the bug). I hope this helps to track the problem down …
Regards, Torsten
Am 16.02.2015 um 04:13 schrieb Kevin Walzer <kw...@co...>:
> 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
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
> _______________________________________________
> Tcl-mac mailing list
> tc...@li...
> https://lists.sourceforge.net/lists/listinfo/tcl-mac
|