import GafferUI # Create a frame frame = GafferUI.Frame() # Add widgets to the frame # ... add widgets here ... # Set the size and position of the frame frame.setFrameStyle(GafferUI.Style.Bordered) frame.setFrameMargin(10) frame.setResizable(True) frame.setPosition(GafferUI.V2f(20, 20)) frame.setSize(GafferUI.V2f(200, 150))
import GafferUI # Create a parent frame parentFrame = GafferUI.Frame() # Create child frames childFrame1 = GafferUI.Frame(label="Frame 1") childFrame2 = GafferUI.Frame(label="Frame 2") # Add child frames to parent frame parentFrame.setChild(childFrame1) parentFrame.setChild(childFrame2) # Set the position and size of child frames childFrame1.setPosition(GafferUI.V2f(10, 10)) childFrame1.setSize(GafferUI.V2f(100, 100)) childFrame2.setPosition(GafferUI.V2f(120, 10)) childFrame2.setSize(GafferUI.V2f(100, 100))In this example, we create a parent frame and two child frames. We then add the child frames to the parent frame and set their properties such as position and size. The package library for Python GafferUI Frame is Gaffer.