How to make a bone active?

Hello again, still having problems here ! :slight_smile:

I am trying to select a bone and make it active in 2.80, so I can run an operation on it (connect it to its parent), the bone gets selected, but does not get active, as shown in the picture, when active, the name of the bone appears in the interface, anyone has an idea what might be the problem here?

Here is the code I use…

bone.select = True;
bone.select_head = True;
bone.select_tail = True;
bpy.ops.armature.parent_set(type=‘CONNECTED’)

Thanks in advance
Gilles

Any luck on this? I’m trying to do something similar and can’t find any info in the documentation.