L
lagu2653 via DotNetMonster.com
Is it possible to set the position of a ListBox scroll bar in C#. I've
inherited the ListBox class. I get a NullReferenceException when I try to do
this:
IEnumerator i = listBox1.Controls.GetEnumerator();
i.MoveNext();
MessageBox.Show(string.Format("i.Current.Visible.ToString() = {0}", (
(ScrollBar)i.Current).Visible.ToString()));
i.Current returns NULL. It works for a datagrid. The controls collection is
empty.
inherited the ListBox class. I get a NullReferenceException when I try to do
this:
IEnumerator i = listBox1.Controls.GetEnumerator();
i.MoveNext();
MessageBox.Show(string.Format("i.Current.Visible.ToString() = {0}", (
(ScrollBar)i.Current).Visible.ToString()));
i.Current returns NULL. It works for a datagrid. The controls collection is
empty.