Search code examples
pythonuser-interfacefiremonkeyhorizontal-line

How to draw or create a Horizontal Divider in a Python FMX GUI App?


How do I create a Horizontal Divider Line as can be seen in the screenshot above the buttons:

UI with three buttons, divider line, and two radio buttons

How can this be accomplished in an FMX GUI App for Python?


Solution

  • There's a Line component that you can create. I've created one here:

    self.myLine = Line(self)
    self.myLine.Parent = self
    self.myLine.Align = "Center"
    self.myLine.Position.X = 100
    self.myLine.Position.Y = 100
    self.myLine.Width = 1000
    self.myLine.Height = 5
    self.myLine.LineType = "Top"
    

    And here's how it looks on a Form:

    Python GUI App with Horizontal Line

    You can obviously move and place it where you want it as well as choose the size and other properties.