- Code: Select all
public void Buttonpress_event(int buttonnumber, bool onscreen)
{
if (onscreen)
{
if (buttonnumber == 1000)
{
// pseudo code to increment a DRO value:
variable = DRO value; // Get value from DRO
variable += 1; // Increment value
DRO = variable; // Write incremented value back to DRO
}
}
}
What would happen if the button was kept pressed down (mouse click and hold on the button) ???
Will this method only run once and not run again until the button was released and clicked again, or would the method run repeatedly while the button was held down.
I'm assuming that internally there are "mouse click down" and "mouse click up" events and this method will only run once for each "mouse click down", and not run again until there is a "mouse click up", and a subsequent "mouse click down".
Correct ???
Keith.