problem sizing a DataGridView

J

Jeff

Hey

..NET 2.0

I've created a User Control which contain a DataGridView. This User Control
is displayed on a TabPage. This TabPage is added to the TabControl during
runtime.

The problem is this:
Lets say if I set the size on the DataGridView to width=400px &
height=300px. But during runtime the DataGridView fills the User Control so
that the right & button edges disappear under the User Control GUI. But it
should be a big gap, but the edge disappear and no gap is displayed between
DataGridView and User Control.

Example:
DataGridView.x = 10; (position on the User Control)
DataGridView.y = 10;
DataGridView.width = 100;
DataGridView.height = 100;
User Control.width = 300
User Control.height=300

Then the DataGridView will fill the entire User Control from x/y=10px and
width/height=300px. It should have been width/height=100px

There are no sizing problem if I in visual studio add the tabpage with the
user control. So I think this problem is related to TabPages being added
during runtime.

any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top