[C#] listBox Autoscrolling

Hy,
probier mal
Code:
// TextBox
textBox1.ScrollToCaret();

// ListBox
listBox1.SelectedIndex = listBox1.Items.Count - 1;
listBox1.SelectedIndex = -1;

// ListView
listView1.EnsureVisible(listView1.Items.Count - 1);

// TreeView
treeView1.Nodes[treeView1.Nodes.Count - 1].EnsureVisible();

// GridView
dataGridView1.FirstDisplayedCell = dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[0];

Lg
ksk
 
Zurück