[Gtk-sharp-list] Gtk.TreeView - dynamic scrolling
Philip Wobst
philip.wobst at aastra.com
Wed Jul 8 10:18:00 EDT 2009
Sorry for not being clear about this - your solution describes exactly
what I am intending to do - however, I need the solution for a
Gtk.TreeView. (Thanks for the prompt reply)
On Wed, Jul 8, 2009 at 9:10 AM, Evan Arnold wrote:
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 done.)
Once you have the index of the row you want:
dataGridView1.FirstDisplayedScrollingRowIndex = index;
dataGridView1.Refresh();
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/19be48c6/attachment.html
More information about the Gtk-sharp-list
mailing list