Windows: how to make the panel scroll bar in the upper position when loading a form

In the form of a window - there is a panel in which a text control is added. When I open the form, I need a scroll bar panel, which is in the upper position., Next to the first control. Now that the form is open, the scroll bar of the panel is on BOTTOM.ie., At the last control.

+3
source share
4 answers

In boot mode, try setting the VerticalScroll property to 0

panel1.VerticalScroll.Value = 0;

EDIT : suppose you have a panel1.AutoScroll = true

0 , .

, , , ( ). . ( , , , )

+6

, :

firstElement.Select();
+6

, . , , .

Nomatter, , VScroll .

, , TabStop, true ( ).

TabStop false .

+1

, tabIndex . ​​, - . .

0

Source: https://habr.com/ru/post/1712838/


All Articles