Unable to set Height

U

Udi

Hi All,
I have a listbox (owner drawn) on a form.
the form is topLevel with no parent.

My problem is that I can't set the Height of neither the from or the
control to the values I want.
after I single step the following lines:

int height = 20;
this.autoCompForm.Height = height + 1;
this.autoCompForm.AutoCompListBox.Height = height;
int i = this.autoCompForm.Height;

** at this point 'i' gets a strange value, not 20 as expected.

I tried docking, it didn't help. the listbox just refuses to fit in
nicely on its form.
(In small heights, ther's always a gap between the listbox and the
form)
Any ideas?

Thanks,
Udi.
 
U

Udi

All,
In my listBox CTOR -

this.IntegralHeight = false;

solved the problem.
Thanks anyway!
Udi.
 

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