New-UDTooltip show true/false?

Product: PowerShell Universal
Version: 3.6.1
Reference: https://docs.powershelluniversal.com/userinterfaces/dashboards/components/data-display/tooltip

Does anyone know how to make the ToolTip enabled/disabled dynamically?
I wish i could -show $false

Do you want to control the actual display of the tooltip dynamically or whether the tooltip should be shown when hovered?

The former would be something like, clicking a button would show a tooltip on some other element.

The latter would be something like, hovering a link and whether or not to show a tooltip.

Here you will see the tool tip as it should be:

but if i wrap it in a condition, it leaves the tooltip blank:

suggestion

$myCondition = 1 -eq 0
New-UDTooltip -ShowTooltipContent $myCondition -Content {
        New-UDButton -Text "testing"
    } -TooltipContent {
        #Content to display
    }
1 Like

Do you want to control the actual display of the tooltip dynamically or whether the tooltip should be shown when hovered?

When i generate the button, sometimes there isn’t anything in the tool tip to show. Thus i want to turn it off.

The former would be something like, clicking a button would show a tooltip on some other element.

No, it isn’t action related, not something where you click and then a tool tip pops up.

The latter would be something like, hovering a link and whether or not to show a tooltip.

This is interesting, so basically in dev i am testing for $env:psuEnv -eq “Dev”, and then i want the tool tip to show development information, when i go to prod, then i don’t want the end user to see all my on screen debug information.

1 Like