Framework-independent function API

Previous Next

USoft provides a function API for creating controls that are portable across supported frameworks.

Why would you need this?

Creating a button directly out of a HTML string does not automatically style it the same way as a button generated by a button control in a framework you are using, nor will it always behave the same way. Of course, adding the appropriate classes and event types would solve that, but when changing to a different framework you will have to change all these class names and even types. Moreover, some frameworks behave completely differently than others, with different HTML elements that are needed, and even different framework-specific events.

The syntax and API for framework-independent functions is identical for each of the frameworks supported: the function body takes care of the differences. The implementation is such that each of these functions, when called, calls another function that is specific for the framework.

For details on supported frameworks, search 'frameworks' on USoft Community or click here.

The examples displayed in the table below happen to make use of the ‘bootstrap4’ framework.





Decorates a plain button. Allows the addition of icons, for example for turning the button into a lookup button.



Creates a group of buttons that act as "radio buttons".



Creates a dialog on the basis of a DIV element.



Creates a bordered box with a header text on the basis of a DIV element.



Creates a horizontally oriented dropdown menu on the basis of an HTML structure consisting of (nested) UL and LI elements.



Creates a tab control that shows one panel at at time, depending on the tab clicked on.



Creates a datepicker using the current framework’s styling classes.



See also

GUI elements (controls)