#Get reference to widget based on name then check if it's visible my $ref = \${$widget_name}; if($$ref->IsVisible()) { ... }