How to add a checkbox to a panel header?
Add draw_header(context) function to your Panel class and supply any bool property. Following example is based on ui_panel_simple.py template:
import bpy

class HelloWorldPanel(bpy.types.Panel):
    &quot;&quot;&quot;Creates a Panel in the Object properties window&quot;&quot;&quot;
    bl_label = &quot;Hello World Panel&quot;
    bl_idname = &quot;OBJECT_PT_hello&quot;
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = &quot;object&quot;

    def draw_header(self,context):
        # Example property to display a checkbox, can be anything
        self.layout.prop(context.scene.render, &quot;use_border&quot;, text=&quot;&quot;)
    
    def draw(self, context):
        layout = self.layout
        layout.label(text=&quot;Hello world!&quot;, icon='WORLD_DATA')


def register():
    bpy.utils.register_class(HelloWorldPanel)


def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)


if __name__ == &quot;__main__&quot;:
    register()