ttk::scrollbar problem on 64-bit Window 7

  • Follow


When, on 64-bit Windows 7, I attach a ttk scrollbar to a text widget
with and put nothing in the text widget, the scrollbar thumb fills the
scrollbar trough. This is not beautiful.

The scrollbar has no thumb in this situation, if I use tk scrollbar or
run on XP.

The bug appears on 64-bit Windows 7 whether I use Tcl\Tk 8.5.8.1 or 64-
bit Tcl\Tk 8.5.9.0

This code:
    text .t -yscrollcommand {.s set}
    ttk::scrollbar .s -orient vertical -command {.t yview}

    pack .s -side right -fill y
    pack .t -expand yes -fill both

demonstrates the problem.

I was wondering if anyone else has seen this and maybe knows a
workaround aside from the obvious one of using scrollbar in place of
ttk::scrollbar?

BTW disabling the ttk::scrollbar seems to have no effect. I think the
guy with the
giant thumb, is disabled already.

Also, the fact that tk works and ttk does not, made me to wonder
whether I was seeing
a bug in windows theming, not tickle. However, in a C# Forms test app,
a scrollbar attached to an empty rich edit (a very crude text widget),
has no thumb.
0
Reply Angus 12/11/2010 12:37:06 AM

Angus <angus633@hotmail.com> writes:

>When, on 64-bit Windows 7, I attach a ttk scrollbar to a text widget
>with and put nothing in the text widget, the scrollbar thumb fills the
>scrollbar trough. This is not beautiful.
>
>The scrollbar has no thumb in this situation, if I use tk scrollbar or
>run on XP.
>
>The bug appears on 64-bit Windows 7 whether I use Tcl\Tk 8.5.8.1 or 64-
>bit Tcl\Tk 8.5.9.0
>
>This code:
>    text .t -yscrollcommand {.s set}
>    ttk::scrollbar .s -orient vertical -command {.t yview}
>
>    pack .s -side right -fill y
>    pack .t -expand yes -fill both
>
>demonstrates the problem.
>
>I was wondering if anyone else has seen this and maybe knows a
>workaround aside from the obvious one of using scrollbar in place of
>ttk::scrollbar?
>
>BTW disabling the ttk::scrollbar seems to have no effect. I think the
>guy with the
>giant thumb, is disabled already.
>
>Also, the fact that tk works and ttk does not, made me to wonder
>whether I was seeing
>a bug in windows theming, not tickle. However, in a C# Forms test app,
>a scrollbar attached to an empty rich edit (a very crude text widget),
>has no thumb.

I doubt this is specific to x64 but common to ttk on the Vista or Win7
themes. When the scrollbar will fill the trough (.scrollbar get returns
{0.0 1.0}) the widget is disabled. So what is needed is a way to specify
the thumb should be hidden when disabled. However, we just ask the
windows theme engine to draw a disabled thumb and it seems this is not
quite the same as the stock widget.

I suggest you raise this as a bug at SourceForge to keep it in view.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
0
Reply Pat 12/11/2010 9:55:15 PM


1 Replies
253 Views

(page loaded in 0.027 seconds)

Similiar Articles:













7/23/2012 9:30:08 PM


Reply: