C
chris
hi all,
i need to create vertical scrollbar dynamically for the controls
that are created dynamically in the form. (i'm not adding any controls
to the panel). when the form exceeds(coz of dynamic controls creation)
the default system coordinates, vertical scroll bar should be
dynamically produced in the form.
in this case i could produce the vscrollbar dynamically. but when
i'm scrolling the form,the controls which are down couldn't be
scrolled up.
i'm doing it in this way,
if(height >= 600)
{
vsb=new VScrollBar();
vsb.Dock=DockStyle.Right;
vsb.Maximum = 600;
vsb.LargeChange = 250;
vsb.ValueChanged +=new EventHandler(vsb_ValueChanged);
Controls.Add(vsb);
}
....
....
....
private void vsb_ValueChanged(object sender, EventArgs e)
{
this.Top = -vsb.Value;
}
any suggestion in this regard would be greatly appreciated.
Thanks and Regards
chris
i need to create vertical scrollbar dynamically for the controls
that are created dynamically in the form. (i'm not adding any controls
to the panel). when the form exceeds(coz of dynamic controls creation)
the default system coordinates, vertical scroll bar should be
dynamically produced in the form.
in this case i could produce the vscrollbar dynamically. but when
i'm scrolling the form,the controls which are down couldn't be
scrolled up.
i'm doing it in this way,
if(height >= 600)
{
vsb=new VScrollBar();
vsb.Dock=DockStyle.Right;
vsb.Maximum = 600;
vsb.LargeChange = 250;
vsb.ValueChanged +=new EventHandler(vsb_ValueChanged);
Controls.Add(vsb);
}
....
....
....
private void vsb_ValueChanged(object sender, EventArgs e)
{
this.Top = -vsb.Value;
}
any suggestion in this regard would be greatly appreciated.
Thanks and Regards
chris