Home > Net >  Vb.net how to implement a panel with code and controls reproduction
Vb.net how to implement a panel with code and controls reproduction

Time:12-13

I added some in the panel1 controls, in the child nodes of the treeview node1 default exists, and the bundle of the panel, and then add 2 in the treeview, double-click on the 2 judge whether there is any panel2, it doesn't exist a copy panel1 named panel2, then panel1. Hide, show panel2, how to do?

CodePudding user response:

Well, it seems that you want to keep the data persistence and displayed in the panel1 inside, if it is not necessary, or node1, 2 corresponding panel1 and panel2 is the same control, the contents of the same, so you'd better write the data layer and layer showed obvious separation - a function or class specialized data is displayed, instead of doing multiple sets of controls or want to take advantage of existing control generating a (is not cannot achieve, is quite troublesome says, at least I don't want to do so) save the data in the controls,

If you must do a number of panel, and want to bring the convenience of using the interface editor, you can customize a control,

  • Related