Posted 16 years ago
by BLANC Stéphane
-
Staubli Robotics Suite Product Manager,
STAUBLI
Version: 2.0.0105

Hi,
I have a really weird behavior with a custom BarButton.
In the UpdateState (that is called by my barManager) I update the "checked" property but the button isn't redrawn.
In order to view the new state (checked or not) I need to put the cursor of the mouse over the button...
Any idea to solve my problem ?
Thanks for your help
Regards
Stéphane
I have a really weird behavior with a custom BarButton.
In the UpdateState (that is called by my barManager) I update the "checked" property but the button isn't redrawn.
In order to view the new state (checked or not) I need to put the cursor of the mouse over the button...
Any idea to solve my problem ?
Thanks for your help
Regards
Stéphane
public class ToggleShowAnalogicCardsCommand : BarButtonCommand
{
public ToggleShowAnalogicCardsCommand(string x_name, string x_text, int x_imageIndex) : base(x_name, x_text, x_imageIndex)
{
this.Checked = true;
}
public override void ResetCheckable()
{
this.Checkable = true;
}
public override void UpdateState(BarCommandLinkEventArgs x_e)
{
this.Checked = this.physicalIoView.showAnalogicCards;
x_e.Handled = true;
}
protected override void OnClick(BarCommandLinkEventArgs x_e)
{
this.physicalIoView.showAnalogicCards = !this.physicalIoView.showAnalogicCards;
x_e.Handled = true;
}
}