Under Windows 2000 / XP, try the following script:
pack [scrollbar .s -orient horizontal] -fill x
bind .s <Expose> {puts "Expose"}
.s set 0 1; update
pack forget .s
.s set 0 .5; update
pack .s -fill x ;# Always displayed as 0 1
Then do:
event generate .s <Expose> ;# Displayed correctly
Logged In: YES
user_id=72656
The scrollbar is native control, and doesn't always respond
to the Expose event as expected (an X11 term). Perhaps
there is another way to achieve what you wanted?
Logged In: YES
user_id=493507
The problem arise when, for example, a scrollbar is updated
in a hidden page of a notebook. It is not redrawn, since it
is unmapped, but when the notebook page is raised, it should
be redrawn by the Expose event (in tkScrollbar.c,
TkScrollbarEventProc()), which is not sent.
The same test script with a ttk::scrollbar in winnative
theme work correctly (i.e. the scrollbar is drawn according
to its value, and the <Expose> event is received at the Tcl
level).