Announcement

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

    blank space in DynamicForm

    In my project I have the following issue:As you can see I have 2 dynamicForms that add some TextItems attributes.The second form has one more attribute in the beginning of the program but I want the rest host,port,key to be in the same line for both forms,something that can not be done due to that extra item.How can I create a space or adjust the forms so the host,port,key be in the same line horizontally
    Code:
            setWidth100();
            setHeight100();
            HLayout mainHLayout = new HLayout();
            mainHLayout.setMargin(2);
            mainHLayout.setWidth(700);
            mainHLayout.setHeight(200);
            final DynamicForm firstForm = new DynamicForm();
            firstForm.setNumCols(2);
            firstForm.setIsGroup(true);
            firstForm.setMargin(10);
            firstForm.setWrapItemTitles(false);
            firstForm.setItems( hostItem, portItem,KeyItem);
            mainHLayout.addMember(firstForm);
    
            final DynamicForm secondForm = new DynamicForm();
            secondForm.setNumCols(2);
            secondForm.setIsGroup(true);
            secondForm.setMargin(10);
            secondForm.setWrapItemTitles(false)
            secondForm.setItems(extraItem, hostItem2, portItem2,KeyItem2);
    
            mainHLayout.addMember(secondForm);

    #2
    We would need to see the rest of the code, and probably a screenshot, in order to really comment, but the obvious this is that you've got numCols:2 and 3 items and then 4. Even if you've set showTitle:false on those items, you need at least as many columns as you have items. If they have titles, you need double the number of columns.

    See the Form Layout overview for more information.

    Comment


      #3
      Click image for larger version

Name:	Screenshot from 2024-05-01 09-04-50.png
Views:	58
Size:	10.6 KB
ID:	272269
      The first image is how the two forms seem in the window,while i want to achieve this view:Click image for larger version

Name:	Screenshot from 2024-05-01 09-05-06.png
Views:	41
Size:	8.5 KB
ID:	272270

      Comment


        #4
        Hi kostasritsos,

        try a SpacerItem as 1st item in firstForm.

        Best regards
        Blama

        Comment


          #5
          Originally posted by Blama View Post
          Hi kostasritsos,

          try a SpacerItem as 1st item in firstForm.

          Best regards
          Blama
          Thank you!

          Comment

          Working...
          X