How to control spacing/alignment of Label + Horizontal Enum Property?

How to control spacing/alignment of Label + Horizontal Enum Property?

I would like to achieve the layout of this panel but I’m having some issues. The example is from blender’s Bevel Operator. As far as I can tell it’s just an Enum Property without the enum_flag since only Vertices or Edges can be selected at a time:

enter image description here

First attempt:

layout = self.layout
row = layout.row()
row.label(text='My Prop');  row.prop(self, 'enum_prop', expand=True)

Looks pretty similar, just gotta align the label to the right.

enter image description here

Second Attempt:

layout = self.layout
row = layout.row()
split = row.split(factor=0.4)

left_col  = split.column(align=True)
right_col = split.column(align=True)
        
left_col.alignment  = 'RIGHT'
right_col.alignment = 'CENTER'

left_col.label(text='My Prop'); right_col.prop(self, 'enum_prop', expand=True)

enter image description here

Well, I managed to align things into columns but my Enum Prop is suddenly vertical. I figured I wasn’t giving it enough room with the Split factor but that wasn’t the case. How can I achieve the result from the first image?

(Label aligned to the Right + Horizontal Enum Prop)

EXTRA INFO:

If anyone is wondering, here is how I created the property:

enum_items = [  ('ON',  'On',  'Description1'), 
                ('OFF', 'Off', 'Description2')]
                            
enum_prop: EnumProperty(name='My Prop', default='OFF', items=enum_items)

Someone helped me out on Stack Exchange but I will TLDR it here for others. Basically you don’t need columns when drawings props, all you need is to add layout.use_property_split = True:

Full Code:

layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
row = layout.row()
row.prop(self, 'my_enum', expand=True)

That will automatically draw the property with the name we gave it, so no need for labels or columns.