T
Tophe
Hi,
I've noticed a bug with WinForm and scrollbars, and I would like to
know if there is a workaround ...
Bug description :
------------------------
1) create a win form, and add 3 buttons :
* FirstButton : upper left corner of the winform
* SecondButton : location = (0 ; 600)
* ThirdButton : location = (100, 600)
2) Set : ThirdButton.Visible = false
3) Set the Form size to 100 x 100 ... and set : AutoScroll = true
4) Add the following event handler to the Click event of FirstButton
and SecondButton ...
private void OnButton_Click(object sender, EventArgs e)
{
this.ThirdButton.Visible = true;
}
Now is the trick :
- if you click on FirstButton ... the ThirdButton will be displayed to
its right location
- if you scroll to SecondButton and click on it, ThirdButton is
displayed to a wrong location (offset added)
Does anybody know how to solve this issue?
Thanks in advance
I've noticed a bug with WinForm and scrollbars, and I would like to
know if there is a workaround ...
Bug description :
------------------------
1) create a win form, and add 3 buttons :
* FirstButton : upper left corner of the winform
* SecondButton : location = (0 ; 600)
* ThirdButton : location = (100, 600)
2) Set : ThirdButton.Visible = false
3) Set the Form size to 100 x 100 ... and set : AutoScroll = true
4) Add the following event handler to the Click event of FirstButton
and SecondButton ...
private void OnButton_Click(object sender, EventArgs e)
{
this.ThirdButton.Visible = true;
}
Now is the trick :
- if you click on FirstButton ... the ThirdButton will be displayed to
its right location
- if you scroll to SecondButton and click on it, ThirdButton is
displayed to a wrong location (offset added)
Does anybody know how to solve this issue?
Thanks in advance