Get all controls of the current form at design-time

前端 未结 4 667
陌清茗
陌清茗 2021-01-25 14:43

I have a question about design-time things:

I\'ve made a component with an property \"Links\". Those links are Controls. Now I want to make a UI-Dialog (for editing this

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-25 15:34

    To get all of the controls of the current form then use the following code to get a collection of all of the controls on that form:

    MyForm.Controls

    See this MSDN help

    Edit:

    Perhaps these will help?

    Design-time editor support for controls collection

    http://social.msdn.microsoft.com/Forums/en-US/winformsdesigner/thread/64df27e7-8502-42ac-8634-cf8a8937d922/

    Adding design-time support for a nested container in a custom/usercontrol (Winforms)

提交回复
热议问题