Hi,
I am creating a form with a TabControl that includes dynimically created TabPage, containing each on and off buttons.
The way it is currently done, I am struggling to get the object I am currently dealing with to make sure I apply what I want on the proper element.
On each TabPage I have
$btn_VMOff.add_Click({ (ClickOff $Idx) })
but $Idx is always empty Since I suspect it is keeping the variable as opposed to the value I would like to pass as a parameter.
I have tried with $($Idx), "$Idx", b ut it makes no difference.
Currently, my function ClickOff is as follow
Function ClickOff([string]$Parametre)
{ msgbox "Titre" $Parametre "Information"
}
Any idea on how to do this ?
Many Thanks.