Dynamically fill an Enum with a list I'm writting an addon with an UI. In my draw function in my UI class I've this 

layout.prop(bpy.context.scene, 'activebone', text='active bone')


Wich create an enum in the UI.  

And in my register class I've this:

bpy.types.Scene.activebone = bpy.props.EnumProperty(items=active_bone)


In my draw fonction I fill the active_bone list with the some data and but the enum don't refresh himself. I know that i can retype

bpy.types.Scene.activebone = bpy.props.EnumProperty(items=active_bone)


But the draw function is Read only so I can't.
Is it possible to refresh my Enum item in the draw function or am I obliged to do it in an other class like a button?
In this case it sounds like you want to use a dynamic enum, rather then passing a list, pass items as a function (which returns a list), then you can change it dynamically.
See: https://docs.blender.org/api/current/bpy.props.html#bpy.props.EnumProperty