views:

59

answers:

1

I'm trying to stack a few lists on top of each other. But the label.size.height appears to be bigger then the label itself.

When i set the borderstyle to fixedsingle, i see the border around the text. But the height is bigger, so there comes a space between one label and the next.

I have tried to set margin and padding to 0 without result.

Exemple: label.size.height return 23, when the height actually is something around 15.

Does someone knows how i get the right size?

Edit: When i explicitly set the height of the lable, the problem is solved. Is this some problem with autosize?

+1  A: 

I had encounter this kind of problem earlier. The label height oscillated between 17 and 23. But, my labels were placed inside a TableLayoutPanel and so how I fixed it :), by making changes in Designer.cs

HTH

nils_gate
I have not put them in a TableLayoutPanel. But see edit.
Ikke
AutoSize is true by default. Can u tell me the Font size? Setting a different font changes size of Label.
nils_gate
It's just the default font-size.
Ikke