How to get scrollbar events from a ListBox?

How do I respond to scrollbar events in ListBox widgets? It appears
most/all wx widgets have scrolling capability. I've yet to figure out
how this scrolling is exposed to the programmer. Pointers?

Thanks,

···

--
Skip Montanaro - skip@pobox.com - http://www.smontanaro.net/

How do I respond to scrollbar events in ListBox widgets?

You can't, at least not with dropping down to platform specific code.

It appears
most/all wx widgets have scrolling capability. I've yet to figure out
how this scrolling is exposed to the programmer. Pointers?

While the scrolling and related methods are inherited from wx.Window, they typically have no effect on the native widgets that have their own scrollbar. In those cases the scollbar is more or less an implementation detail that is hidden from us and the scroll events will be consumed by the native widget itself before we get access to them.

What is it you are wanting to do? Perhaps there is another way to do it that we can help you with.

···

On 11/2/09 4:58 PM, Skip Montanaro wrote:

--
Robin Dunn
Software Craftsman

How do I respond to scrollbar events in ListBox widgets?

    > You can't, ...

    > What is it you are wanting to do? Perhaps there is another way
    > to do it that we can help you with.

Synchronize several lists of the same size so any of the list's scrollbars
would move all N of them. For example, I might have

    Name First Value Last Value

···

-----------------------------------------
    time 17:00:32 19:14:00
    sigma 0.0012 0.1001
    ... ... ...

The first row are titles and would presumably be in labels which are
siblings of the ListBox widgets. The rows below the dashes represent three
different ListBox widgets I want to scroll together.

Thanks,

Skip

Do they really need to be separate widgets or would using a wx.ListCtrl in report mode do it for you? It would also take care of displaying the header labels allow you to have resizable columns, etc.

···

On 11/3/09 6:49 AM, skip.montanaro@gmail.com wrote:

     > What is it you are wanting to do? Perhaps there is another way
     > to do it that we can help you with.

Synchronize several lists of the same size so any of the list's scrollbars
would move all N of them. For example, I might have

     Name First Value Last Value
     -----------------------------------------
     time 17:00:32 19:14:00
     sigma 0.0012 0.1001
     ... ... ...

The first row are titles and would presumably be in labels which are
siblings of the ListBox widgets. The rows below the dashes represent three
different ListBox widgets I want to scroll together.

--
Robin Dunn
Software Craftsman