Bring Winforms control to front

前端 未结 5 700
刺人心
刺人心 2020-12-03 21:05

Are there any other methods of bringing a control to the front other than control.BringToFront()?

I have series of labels on a user control and when I

5条回答
  •  一生所求
    2020-12-03 21:33

    Controls' z-index is per-container.

    If you call BringToFront on a control that is inside a container (such as a Panel), it will not bring the container to the front.
    Therefore, the control will only go in front of other controls in that container.

    To see what containers your controls are in, you can use the Document Outline pane in the View menu.

    EDIT: Your userContainer control is probably behind a different control.

提交回复
热议问题