Menu

#1966 Scrollbar don't receive <Expose> event

open-invalid
5
2005-12-01
2005-09-26
No

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

Discussion

  • Jeffrey Hobbs

    Jeffrey Hobbs - 2005-12-01
    • status: open --> pending-invalid
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2005-12-01

    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?

     
  • Eric Boudaillier

    • status: pending-invalid --> open-invalid
     
  • Eric Boudaillier

    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).

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.