Announcement

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

    Text item title is not showing

    Hi

    I am using smartgwt 2.2

    I creted a dynamic form and set items by using method setItems(.....)

    I am setting checkbox items and text items but i notice that title for checkbox items are showing but text item title is not showing, only area for entering text is showing.

    I am using Absolute layout for form using dynamicForm.setItemLayout(FormLayoutType.ABSOLUTE);

    If i did not use absolute layout then there is no problem but i need to use absolute layout for proper positioning of formitems


    Any suggestions please!

    Thanks

    #2
    Hi nestedxya,
    If you've gone through the documentation of DynamicForm.SetItemLayout(), it's clearly mentioned that If you use FormLayoutType.ABSOLUTE, titles will not be shown. To get a work around, you can use StaticTextItem to be shown as title.

    Comment


      #3
      Originally posted by RAS
      Hi nestedxya,
      If you've gone through the documentation of DynamicForm.SetItemLayout(), it's clearly mentioned that If you use FormLayoutType.ABSOLUTE, titles will not be shown. To get a work around, you can use StaticTextItem to be shown as title.

      Thanks for your kind information! but still using statictextitem is not working,
      its again not showing title

      Comment


        #4
        Can you post your code here? (Make sure I should also be able to generate the case.)

        Comment


          #5
          Note that the staticTextItem will not show a title either - only it's contents.

          Comment


            #6
            Originally posted by RAS
            Can you post your code here? (Make sure I should also be able to generate the case.)
            Code:
            vLayout = new VLayout();
            vLayout.setDragAppearance(DragAppearance.TARGET);  
            vLayout.setOverflow(Overflow.AUTO);  
            vLayout.setRedrawOnResize(true);
            vLayout.setMembersMargin(10);  
            vLayout.setMinWidth(100);  
            vLayout.setMinHeight(50); 
            
            vLayout.addMember(getDiagnosisForm());
            
            public DynamicForm getDiagnosisForm() {
            		if(diagnosisForm==null){
            			diagnosisForm = new DynamicForm();
            			diagnosisForm.setGroupTitle("Diagnosis");  
            			diagnosisForm.setIsGroup(true);
            			diagnosisForm.setWidth100();
            			diagnosisForm.setHeight(50);
            			diagnosisForm.setColWidths(100, "*");  
            			diagnosisForm.setBorder("0px solid blue");  
            			diagnosisForm.setPadding(10);  
            			diagnosisForm.setCellSpacing(10);
            			diagnosisForm.setCanDragResize(true);  
            			diagnosisForm.setResizeFrom("R"); 
            			diagnosisForm.setItemLayout(FormLayoutType.ABSOLUTE);
            			diagnosisForm.setItems(getTestStatic());
            			diagnosisForm.setValuesManager(valuesManager);
            
            		}
            		return diagnosisForm;
            	}
            
            	private StaticTextItem getTestStatic() {
            		if(testStatic==null){
            			testStatic = new StaticTextItem("testStatic","Test");
            		}
            		return testStatic;
            }
            This is neither showing title nor field for entering text

            Also I want some thing in which I can enter text.
            Using StaticTextItem will not allow me to enter text just like TextItem
            Last edited by nestedxyz; 3 Mar 2011, 02:39.

            Comment


              #7
              Originally posted by RAS
              Hi nestedxya,
              If you've gone through the documentation of DynamicForm.SetItemLayout(), it's clearly mentioned that If you use FormLayoutType.ABSOLUTE, titles will not be shown. To get a work around, you can use StaticTextItem to be shown as title.
              I think I did some mistake last time.

              StaticTextItem is working for me.

              Once again thanks for help ! :)

              Comment

              Working...
              X