How do I change text on a panel row or hide it depending on the value of an EnumProperty? I want to put four or five choices in an EnumProperty so I can pick a choice of actions. Most choices won't need additional input, but one (possibly two) will need more input. For example, let's say Choice 4 needs a StringProperty and Choice 5 needs a BooleanProperty.
If I pick 1, 2, 3, or 5, I'd like both of the extra properties hidden, but if I pick Choice 4 from the Enum, I'd like the row with the StringProperty to appear. If I pick 5, I'd like the StringProperty (From 4) to disappear and the BooleanProperty to appear.
Also, I want to specify, with another row, info on the current status, so when the EnumProperty changes, I need to make another row visible or not and I need to change the string in my status row.
I've been looking this over and it looks like if a set the text in a row to something like:
row.label(text=&quot;My test status: &quot; + context.scene.TestStatus)

and I do this along the way:
bpy.types.Scene.TestStatus = &quot;Current Test Status&quot;

that whenever I change the value of bpy.types.Scene.TestStatus that the value in the row on the panel will change. Am I right about that? Does Blender handle all that so I don't have to do something like &quot;on value change&quot; for the Enum? I've seen a few partial examples, but I'm not quite sure how this works. The same is true in reading the Enum value - where would I put the code to read the Enum value and show or hide the String and Boolean properties?
Given a defined enumerated list:
proplist: bpy.props.EnumProperty(
    items=((&quot;BoolProperty&quot;, &quot;Bool&quot;, &quot;Boolean&quot;),
    (&quot;BoolVectorProperty&quot;, &quot;Bool&quot;, &quot;Boolean&quot;), # duplicate name, desc
    (&quot;FloatProperty&quot;, &quot;Float&quot;, &quot;Floating Point&quot;),
    (&quot;FloatVectorProperty&quot;, &quot;Float Vector&quot;, &quot;Floating Point Vector&quot;),
    (&quot;IntProperty&quot;, &quot;Int&quot;, &quot;Integer&quot;),
    (&quot;IntVectorProperty&quot;, &quot;Int Vector&quot;, &quot;Integer Vector&quot;),
    (&quot;PointerProperty&quot;, &quot;Pointer&quot;, &quot;Pointer Property&quot;),
    ),
    name=&quot;proplist&quot;,
    description=&quot;Selectable properties to add&quot;,
    default=&quot;BoolProperty&quot;,
    )

The items require an identifier (unique to the list), a name (potentially duplicated internal to a list), and a description (potentially duplicated internal to a list).

items (sequence of string tuples or a function) – sequence of enum
items formatted: [(identifier, name, description, icon, number), ...].
The first three elements of the tuples are mandatory.

As such any test should be performed against the identifier of the list.
Within the panel you can then perform logical test:
if items[props.proplist].identifier == 'PointerProperty':
    col.prop(props, 'test_str')
if items[props.proplist].identifier == 'BoolProperty':
    col.prop(props, 'test_bool')

And provide information based on the selection:
items = props.bl_rna.properties['proplist'].enum_items
col.label(text=f&quot;item [ identifier ] : {items[props.proplist].identifier}&quot;)
col.label(text=f&quot;item [ name ] : {items[props.proplist].name}&quot;)
col.label(text=f&quot;item [ description ] : {items[props.proplist].description}&quot;)

An overall example script below:
import bpy


class TEST_PG(bpy.types.PropertyGroup):
    proplist: bpy.props.EnumProperty(
        items=((&quot;BoolProperty&quot;, &quot;Bool&quot;, &quot;Boolean&quot;),
        (&quot;BoolVectorProperty&quot;, &quot;Bool&quot;, &quot;Boolean&quot;), # duplicate name, desc
        (&quot;FloatProperty&quot;, &quot;Float&quot;, &quot;Floating Point&quot;),
        (&quot;FloatVectorProperty&quot;, &quot;Float Vector&quot;, &quot;Floating Point Vector&quot;),
        (&quot;IntProperty&quot;, &quot;Int&quot;, &quot;Integer&quot;),
        (&quot;IntVectorProperty&quot;, &quot;Int Vector&quot;, &quot;Integer Vector&quot;),
        (&quot;PointerProperty&quot;, &quot;Pointer&quot;, &quot;Pointer Property&quot;),
        ),
        name=&quot;proplist&quot;,
        description=&quot;Selectable properties to add&quot;,
        default=&quot;BoolProperty&quot;,
        )
    test_str: bpy.props.StringProperty(
        name=&quot;test_str&quot;,
        description=&quot;str&quot;,
        default=&quot;Junk&quot;,
        )
    test_bool: bpy.props.BoolProperty(
        name=&quot;test_bool&quot;,
        description=&quot;bool&quot;,
        default=True,
        )


class VIEW3D_PT_test():
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = &quot;Test Panel&quot;


class TEST_PT_sub_01(VIEW3D_PT_test, bpy.types.Panel):
    bl_idname = &quot;VIEW3D_PT_test_panel_1&quot;
    bl_label = &quot;Test Panel 1&quot;
    

    def draw(self, context):
        props = context.scene.my_property_group
        layout = self.layout
        box = layout.box()
        col = box.column(align=True)
        col.prop(props, &quot;proplist&quot;)
        items = props.bl_rna.properties['proplist'].enum_items
        col.label(text=f&quot;item [ identifier ] : {items[props.proplist].identifier}&quot;)
        col.label(text=f&quot;item [ name ] : {items[props.proplist].name}&quot;)
        col.label(text=f&quot;item [ description ] : {items[props.proplist].description}&quot;)
        
        if items[props.proplist].identifier == 'PointerProperty':
            col.prop(props, 'test_str')
        if items[props.proplist].identifier == 'BoolProperty':
            col.prop(props, 'test_bool')
        row = col.row()


classes = [TEST_PG,
        TEST_PT_sub_01,
        ]


def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.my_property_group= bpy.props.PointerProperty(
            type=TEST_PG)


def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)
    del bpy.types.Scene.my_property_group

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