Label field value expandable??

Label field value expandable??

Forum member · Aug 29, 2008
I am displaying some labels in the pdf .But in the columns when i display some fields then they get overlapped. I want the fields to be displayed properly in that row or in separate row . I am giving the code below String text = "This is dark blue dfdfd dfdfd"; //Label customerID = new Label(tmpCustomerId, 2, currentY + 3,58, 11,Font.getTimesRoman(), 11); Label phone = new Label(text, 550, currentY + 3, 96, 11,Font.getTimesRoman(), 11); Can the label field be expandable to accomodate the whole data??

Re: Label field value expandable??

Support · Aug 29, 2008
Hello, In your code you are increasing the currentY by 3 points to give the Y position of the label. Please make sure that you increasing the currentY to a sufficient value so that you can add another label after adding the first one without overlapping. You will have to take care of the Y position in order to stop overlapping of the elements. You can change the Height and Width of a Label by using the respective properties but it is not possible to get the requred height for a label. Label can not be expanded automatically. You can get the required height for the given text of a TextArea element by using the GetRequiredHeight method of the TextArea object. You can increase the height of the text area if required depending on the height returned by this method. You will have to add some padding to this height and then you can add another element after this. Thanks, ceTe Software Support Team.