[IronPython] Strange IPY / WPF behavior on a ListBox

Ken MacDonald drken567 at gmail.com
Fri Apr 30 21:43:49 CEST 2010

Failing being able to get this working, is there a way in IPY/WPF to
manually scroll a ListBox? I could theoretically do something like this

while True:

     if my_selected_item.IsHitTestVisible():
          my_selected.item.ScrollDown  <===== anything like this?

On Fri, Apr 30, 2010 at 3:08 PM, Ken MacDonald <drken567 at gmail.com> wrote:

> I'm seeing some weirdness - I had a small popup dialog working in WPF/IPY
> where I had a ListBox with way too many elements to display, say about 30 or
> so where the available space would hold 4 or 5. I selected one of the
> elements (a ListBoxItem in the single selection ListBox), and executed
> BringIntoView() <http://msdn.microsoft.com/en-us/library/ms598110.aspx> on
> the ListBoxItem. Worked great, the selected item showed up.
> Now, I've had to add more stuff to the dialog (an on-screen touch keyboard)
> and made the whole dialog modal; now I can't get the BringIntoView() to
> work. I have handlers on several events to try and get the BringIntoView()
> to happen, considering it has to be fired while it is Visible, and the
> handlers are getting fired, but I never see the selected item get scrolled
> into view. I've even attached handlers to some unrelated events like
> TextBox.TextChanged that I *know* are happening well after the whole dialog
> is rendered. Still no luck. Everything else in the ListBox works just as it
> did before, but now I can no longer show the 'default' item when the dialog
> starts. Anyone have any interesting clues? I've been at this most of the day
> trying different handlers, etc. and it's making no sense whatsoever.
> Thanks,
> Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100430/c2f70826/attachment.html>

More information about the Ironpython-users mailing list