Description
Loads the RibbonBar content from a JSON string. ECMA-404 JSON standard is supported.
Applies to
RibbonBar controls
Syntax
controlname.ImportJSON ( Data )
Argument |
Description |
---|---|
controlname |
The name of the RibbonBar control. |
Data |
A JSON string that contains the RibbonBar content. |
Return value
Integer.
1 - Successful.
-1 - An internal error occurs.
-2 - The library fails to load.
-5 - Any of the following: 1) JSON syntax error; 2) JSON encode error; 3) JSON data is null.
If any argument's value is null, returns null.
Examples
This example loads a JSON string to create the ribbon bar:
Integer li_return string ls_Json ls_Json = '{"BuiltinTheme":0,"Font":"FaceName:Tahoma;TextSize:8","RibbonItems":{"Category":[{"Text":"Category","Panel":[{"Text":"Panel","PictureName":"TabsSmall!","RibbonItem":[{"SmallButton":{"Text":"SmallButton","PictureName":"EmployeeSmall!","Clicked":"ue_ButtonClicked"}}]}]}],"TabButton":[{"Text":"TabButton","PictureName":"ArrowUpSmall!","Clicked":"ue_TabButtonClicked"}]}}' li_return = rbb_1.ImportJSON(ls_Json)
See also