Search code examples
kivykivymd

How to remove outer layer margin from MDTextField?


I want to have two MDTextFields touching each other at their bottom and top border

The MDTextField has an outer layer which prevents them from touching each other. Is there a property to remove this margin? Margins I want to remove(black rectangles):

MDTextfields colored to show the margins

Lines I want to touch:

Arrows pointing at parts of borders I want to merge together

   BoxLayout:
        orientation:"vertical"
        size_hint: 1, None
        height:textfield1.height+ textfield2.height
        MDTextField:
            id:textfield1
            hint_text: "Rectangle mode"
            mode: "rectangle"
        MDTextField:

            id:textfield2
            hint_text: "Rectangle mode"
            mode: "rectangle"
    

Final product would be something like this: Here

Thank you!


Solution

  • I can't comment due to rep. This worked for me:

    spacing:"-10dp" in BoxLayout