23 Kasım 2016 Çarşamba

Autoscroll (TextBox, ListBox, ListView)


Bu örnek ne kadar programlı AutoScroll WinForm denetimleri TextBox, ListBox, ListView, TreeView ve DataGridView içindir.
Eğer günlük pencere, bu bileşenlerden biri kullandığınızda kutusu ya da görünüm sonuna Autoscroll durumlarda, örneğin, yararlıdır. Genellikle kutu veya görünüme öğeler eklemek ve son eklenen madde elle bunu yapmak için gerekli olmadan görünür olduğundan emin olmak istiyorum.

TextBox autoscroll

textBox1.SelectionStart = textBox1.Text.Length;
textBox1.ScrollToCaret();

ListBox autoscroll

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

ListView autoscroll

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

TreeView autoscroll

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

DataGridView autoscroll

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


ifadeler ifadeler