Reputation: 1869
Here's what I did:
Here's the problem I'm having:
Shouldn't the top of the text field be at the bottom of the button? Why is the button overlapping it?
Upvotes: 3
Views: 2736
Reputation: 54532
You are using the wrong sequence, when you place your TextBox
first and set its Dock
Property to Fill
it will take up the Form's
complete client area, then when you place your Button
it overlays your TextBox
. Try adding the Button
first setting its Dock
Property to Top
, then add your TextBox
setting its Dock
Property to Fill
. It should then work as expected.
On further investigation it looks like it has to do with the z-order, if you right click your button and select send to back it should cause the textbox to correct itself.
Upvotes: 5