Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    problem in DymanicForm Printing

    I am using smartgwt2.2 and firefox 3.0.8

    I have a problem when doing a showPrintPreview() for dynamicForm in vLayout.When i click on the print button,printPreview Screen contain empty screen.that is content of dynamic form is not displayed for printing.
    Moreover if i use canvas instead of dynamic Form i can see the printPreview.
    what is the solution for this?

    Code:
    public class Test implements EntryPoint { 
    public void onModuleLoad() { 
    
    final VLayout vlayout = new VLayout();
    vlayout .setWidth100();
    vlayout .setHeight100();
    
    DynamicForm df = new DynamicForm();
    df.setWidth100();
    df.setHeight100(); 
    IButton b = new IButton();
    b.setTitle("Print");
    b.setLeft(300);
    Label label=new Label();
    label.setContents("how are you?");
    label.setLeft(100);
    df.setItems(b);
    df.addChild(label);
    b.addClickHandler(new ClickHandler(){
    
    @Override
    public void onClick(ClickEvent event) {
    // TODO Auto-generated method stub
    Canvas.showPrintPreview(vlayout);
    }
    
    });
    vlayout.addMember(df);
    vlayout.draw();
    } 
    }

    #2
    Hi

    I think the reason you are getting empty screen in print preview beacuse of Labels.

    Try using some other controls.

    Comment


      #3
      but i want to add both formItems(TextItem) using setFields and canvas(like Ibutton) using addChild() in dynamic form .

      if i do Canvas.showPrintPreview(df)
      Then its showing only setFields() Item.
      now wt should i do?

      Comment

      Working...
      X