Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15705

VS 2019 While in DesignMode drag Item on Control and then Programmatically add another.

$
0
0
I have a Control, inheriting a Panel.
Programmatically I can add another Control as its child, and have the Parent add one more child, and change their size to fit its container.
Now I'm trying to do the same in DesignTime: Dragging a Control on my Control and have the Parent add another child.
I have used onControlAdded to react to the drop, which adds an other Control as it should.
But, their size doesn't change, it stays the defaultsize.
Plus, I can see the dropped Control in View and in the PropertiesBox, but not the programmatically create one.
I don't add an example code, because I suspect the problem is more fundamental.
(the whole approach probably):ehh:
But if it would help?

Viewing all articles
Browse latest Browse all 15705

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>