Label Height

Label Height

Forum member · Aug 16, 2007
Is is possible to get the actually height of a label? text = "WARNING TO OWNER: Under FLORIDA LAW, your failure to make sure we are paid may result in a LEIN AGAINST "; text += "YOUR PROPERTY and your PAYING TWICE. To avoid a lein and paying twice, you MUST obtain a WRITTEN RELEASE from:"; Label label = new Label(text, iX, iY, iW, iH, Font.TimesRoman); I set the value for iH but I would like the actual value once the label is posted on the page so I know where to start the next label. Thanks, Krn

Re: Label Height

Support · Aug 16, 2007
Hello, The Label object would typically be used for text that is smaller or text that is predictable in size. You could think about labels like the actual labels on a PDF you create like "Name". Maybe it would be used for some static text that you want to place in a certain area of the page. The TextArea on the other hand is typically used for text that you do not know the size of and it can be added completely dynamic. TextArea has methods built into it for handling the overflow as well as calculating the height of text dynamically. So in your case using TextArea will be more effective. Using the GetRequiredHeight method you can find out the height required to fit the given text and then start the next TextArea or Label. Thanks, ceTe Software Support Team