I try to create a box with 3 EnumProperty elements. When i just create the items in a box like here:
box = layout.box()
box.label("Add new Avastar")
col = box.column()
col.operator("add_avatar", text="Create")
col = box.column(align=True)
col.prop(self, "mesh_type", text='Character Mesh')
col.prop(self, "rig_type", text='Rig Type')
col.prop(self, "weight_type", text='Weight Variant')
Then i get this result:
So i see how the selection menus are a bit too wide and because of this the text label to the left side gets truncated. However there is a lot of free space to the right side of the button labels. So i first checked if maybe one of the option texts is too wide, but that is not the case.
Here are the text labels for all options involved in this example:
character type: [ Rig only | with Tris | with Quads ]
mesh_type: [ Classic | Extended ]
rig_type : [ Classic | Extended ]
Next i thought maybe i can get an improvement when i use the alignment property as follows:
box = layout.box()
box.label("Add new Avastar")
col = box.column()
col.operator("add_avatar", text="Create")
col = box.column(align=True)
col.alignment='RIGHT' # <== See Here!
col.prop(self, "mesh_type", text='Character Mesh')
col.prop(self, "rig_type", text='Rig Type')
col.prop(self, "weight_type", text='Weight Variant')
But this gives me following result:
Next i tested what happens when i replace 'RIGHT' with 'LEFT' in the alignment. But that does not change anything, the alignment looks the same for 'LEFT' and 'RIGHT'.
So what is the trick to get the selectors all aligned to the right edge of the button?
Here is what i hope to achieve (mocked up with my 2D image editor):
How can i create this (or at least something similar)?
Here is a Blend file with an example script:




