ListBox: SetBounds - missing height???

  • Thread starter Thread starter Buddhist.CHinA
  • Start date Start date
B

Buddhist.CHinA

Hi guys, when I used SetBounds to change a listBox's size, I found sth
interesting. But I was wondering whan happened.
For example, I wrote,

this.listBox1.SetBounds( 10, 10, 100, 300);
// x, y, width, height

After that, I got the size of listBox1. However, the height was 290,
not 300 as expected.

Can someone explain why this happened?

thx.
 
I suspect that listbox1.IntegralHeight is true, which means that the list
box will automatically adjust the height to ensure that items are not
partially displayed.
 
Cool!
It works. Indeed, the IntegralHeight is true by default, so...

Appreciated for your enthusiam.
 
Back
Top