Is there a way to vertically align this too, meaning to remove the space between the rows and make the elements connect?
import bpy
from bpy.props import *
from bpy.types import Operator, Panel
bpy.types.Scene.test = IntProperty()
bpy.types.Scene.test2 = IntProperty()
class LayoutDemoPanel(bpy.types.Panel):
"""Creates a Panel in the scene context of the properties editor"""
bl_label = "Layout Demo"
bl_idname = "SCENE_PT_layout"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "scene"
def draw(self, context):
layout = self.layout
scene = context.scene
# Create a simple row.
layout.label(text=" Simple Row:")
row = layout.row(align=True)
split = row.split(align=True)
split.prop(scene, "test")
row = layout.row(align=True)
split = row.split(align=True, percentage=0.7)
col = split.column(align=True)
col.prop(scene, "test2")
col = split.column(align=True)
col.operator("render.render")
def register():
bpy.utils.register_class(LayoutDemoPanel)
def unregister():
bpy.utils.unregister_class(LayoutDemoPanel)
if __name__ == "__main__":
register()