[Gtk-sharp-list] Gtk.TreeView - dynamic scrolling

Evan Arnold evan.arnold at gmail.com
Wed Jul 8 10:09:26 EDT 2009

I assume you can easily find which row has the closest time.  (A simple
foreach measuring the distance between Now and the Datetime while keeping
track of the lowest value would a simple but ineffective way to get this

Once you have the index of the row you want:

dataGridView1.FirstDisplayedScrollingRowIndex = index;

Hope that helps,

On Wed, Jul 8, 2009 at 8:47 AM, Philip Wobst <philip.wobst at aastra.com>wrote:

>  I have a TreeView with elements that have a date and time column and I
> would like to have my application scroll to the position in the TreeView
> that is nearest to the current time when the TreeView is displayed. Is there
> any way of doing this?
> Any suggestions would be gladly appreciated.
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20090708/46d02e0c/attachment-0001.html 

More information about the Gtk-sharp-list mailing list