I apply this type of CSS styling to various buttons in my B4J application:
so when a button is pressed, its background momentarily changes to gold (as shown):
However, when my application is in its self-recording mode, I need the button's [changed] background color to remain for 1 or 2 seconds; ideally before the button's MouseClick event code is executed.
I've tried replacing the MouseClick event with the MousePressed event, and also adding a MouseReleased event, to conditionally call
in order to force the delay - but to no avail.
So, suggestions are welcomed! Thanks in advance.
B4X:
.goldBtnPressed .button:pressed {
-fx-background-color: rgb(177,129,11);
-fx-text-fill: white;
}
so when a button is pressed, its background momentarily changes to gold (as shown):
However, when my application is in its self-recording mode, I need the button's [changed] background color to remain for 1 or 2 seconds; ideally before the button's MouseClick event code is executed.
I've tried replacing the MouseClick event with the MousePressed event, and also adding a MouseReleased event, to conditionally call
B4X:
Sleep(1000)
So, suggestions are welcomed! Thanks in advance.
Last edited: