BUSY - AppDaddy-Software-Solutions-Inc/framework-markup-language GitHub Wiki
<BUSY/> : ViewableWidget
The <BUSY/> widget expands to fill an area with a transparent box and a loading spinner. <BUSY/> is a purely a visual widget designed to notify a user that an action is in progress. <BUSY/> can have children. The default child layout is <STACK/>
BUSY
will expand to fill its parent.
Name | Type | Default | Description | Req |
---|---|---|---|---|
size | int | 32 | The size of the busy spinner. | |
color | color | The color of the busy spinner. | ||
modal | bool | false | Creates a modal barrier to prevent users from clicking through the busy spinner. |
Example #1 : <BUSY/> visibility based on a <GET/> datasource success or fail.
<FML title="BUSY (example1)" linkable="true">
<GET id="get1" autoexecute="false" url="testurl.com" onsuccess="b1.visible.set(false);" onfail="b1.visible.set(false);toast('Data Load Failed');"/>
<BOX center="true" layout="stack">
<BUTTON label="click to load data" onclick="b1.visible.set(true);wait('2s');get1.start();"/>
<BUSY id="b1" visible="false" modal="true"/>
</BOX>
</FML>
Example #2 : <BUSY/> visibility based on a <GET/> datasource's busy attribute showing the datasource's status.
<FML title="BUSY (example2)" center="true">
<GET id="get1" autoexecute="false" url="testurl.com"/>
<BUTTON label="{get1.status}" onclick="b1.visible.set(true);wait('2s');get1.start();" type="outlined"/>
<BUSY id="b1" visible="{get1.busy}"/>
</FML>