Spinner (Bootstrap): Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
No edit summary
 
Line 32: Line 32:
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
// JavaScript
// JavaScript
Alert1.onclick = function() {
Button1.onclick = function () {
   NSB.MsgBox("You can display a message or take other action when clicked");
   Spinner1.show();
};
 
Button2.onclick = function () {
  Spinner1.hide();
};
};


Line 41: Line 45:
<syntaxhighlight lang="vb.net">
<syntaxhighlight lang="vb.net">
' Basic
' Basic
FFunction Alert2_onclick()
Function Button1_onclick()
   MsgBox "You can display a message or take other action when clicked"
   Spinner1.show()
End Function
 
Function Button2_onclick()
  Spinner1.hide()
End Function
End Function
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 18:01, 30 October 2024

Description

Indicate the loading state of a component or page.


Properties and Methods

Standard properties are supported, plus:

bgColor Show a standard spinner or a growing icon.
growing Show a standard spinner or a growing icon.
showText Show the text which spins along?
size Default size, or a bit smaller
text The text of the spinner. 'showText' turns it off.

Events

Standard events are supported. For this control, the onclick event will be most useful.

Example

// JavaScript
Button1.onclick = function () {
  Spinner1.show();
};

Button2.onclick = function () {
  Spinner1.hide();
};

' Basic
Function Button1_onclick()
  Spinner1.show()
End Function

Function Button2_onclick()
  Spinner1.hide()
End Function

Output