Announcement

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

    DynamicForm sets a margin on its items

    Hello,

    I noticed DynamicForm adds a margin to its items somehow. Is this a skin setting or a more general setting?

    I noticed it when using a SectionItem and a SectionStackSection together on the same canvas: they were not aligned at the same position.

    Console showed me that the DynamicForm and SectionStack had the same left position, but the sectionheader of the form item was +2 pixels from that position (left and right margin).

    I've solved it by setting margin to -2 on the form, but I expect that a margin of 0 would do what I want.


    Code:
    //test to align a SectionItem from a DynamicForm
    //to the same position of a SectionStackSection
    VLayout result = new VLayout();
    
    DynamicForm form = new DynamicForm();
    form.setMargin(-2); //to align the sectionItem with the sectionstack 
    
    SectionItem sectionItem = new SectionItem("SectionItem");
    form.setItems(sectionItem);
    
    SectionStack stack = new SectionStack();
    SectionStackSection section = new SectionStackSection("StackSection");
    
    stack.setSections(section);
    result.setMembers(form,stack);

    regards,

    #2
    Probably you're seeing cellPadding (see DynamicForm.cellPadding). DynamicForm does not use default margins.

    Comment


      #3
      Originally posted by Isomorphic
      Probably you're seeing cellPadding (see DynamicForm.cellPadding). DynamicForm does not use default margins.
      Ok, thank you, that did the trick for the SectionItem left position,
      but now all other form don't have no padding which is even more ugly.
      Last edited by levi; 30 Sep 2009, 01:24.

      Comment

      Working...
      X