Add ctrl-click rename to most lists in Blender UI and templates/examples.
[blender.git] / doc / python_api / examples / bpy.types.UIList.2.py
index 4e30e6895d6bbfe6e5b7e47bbd556fec9bf994a9..feed263b2e70436b2dbe37b8d49b6b93f2e1ee9b 100644 (file)
@@ -49,9 +49,9 @@ class MESH_UL_vgroups_slow(bpy.types.UIList):
                 col = layout.column()
                 col.enabled = False
                 col.alignment = 'LEFT'
-                col.label(text=vgroup.name, translate=False, icon_value=icon)
+                col.prop(vgroup, "name", text="", emboss=False, icon_value=icon)
             else:
-                layout.label(text=vgroup.name, translate=False, icon_value=icon)
+                layout.prop(vgroup, "name", text="", emboss=False, icon_value=icon)
             icon = 'LOCKED' if vgroup.lock_weight else 'UNLOCKED'
             layout.prop(vgroup, "lock_weight", text="", icon=icon, emboss=False)
         elif self.layout_type in {'GRID'}: