How do I add a new panel to the Properties Editor?
Texture context
when adding a panel to the properties area we set the context as signified by the icon on LHS. This is set with bl_context.  To get a panel in the questions &quot;Red Area&quot;
bl_context = &quot;texture&quot;

all the examples given in question are in object context. Press the Object tab. (cube)
How to enable or disable panels with the click of a button
Eg for Hello World example.
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;texture&quot;

    def draw(self, context):
        layout = self.layout

        obj = context.active_object

        row = layout.row()
        row.label(text=&quot;Hello world!&quot;, icon='WORLD_DATA')

        row = layout.row()
        row.label(text=&quot;Active object is: &quot; + obj.name)
        row = layout.row()
        row.prop(obj, &quot;name&quot;)

        row = layout.row()
        row.operator(&quot;mesh.primitive_cube_add&quot;)


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


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


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