thanks , but that is not what i ment.
i will try to explain again.
the lable's height i growing acording to text in it.
and when i am trying to make the panel height to same size of the label the panel's height is too big.
Use string utils or cnvas to measure label text height. After this, set label hight to -2 (special constant that fit parent size to content) and height of panel to label text height