Successfully!

Error!

[General] Mobile Terminal Custom Widget Style

  • Last update:  2021-12-14
  • I. Overview

    1. Version

    Report server versionApp VersionHTML5 Mobile display pluginNew features
    10.010.4.76V10.4.76Customize the style of the mobile widget

    2. Application scenarios

    When users encounter the following scenarios, they need to adjust the widget style:

    • The heights of the wedgets in the template are different. For the aesthetics of the template, the heights of the wedgets need to be consistent.

    • Some wedgets do not need to set the wedgets border, such as radio button group wedgets.

    • In a non-light-colored background, the background color of the wedgets is not consistent with the background where it is located.

    • The font color of the wedgets does not match the overall effect of the template.


    3 Function introduction

    Users can customize the background color, border line type, border color, font size and other properties of the widget in theStyle Template of the widget.

    II. Example 1: Set the widget style template

    1. Effective range

    Report TypeWidget LocationFunction Description
    Dashboard
    Parameter PaneOnly supports setting the font size
    bodyWidget background, border line style, widget font, etc. are all supported

    Note: Only the JAR package version after 2020-06-08 can achieve the effect


    2. Template preparation

    1) ClickTemplate>New Dashboard in FineReport Designer.

    2) Drag in theDrop-down Box widget in the dashboard, and set the data dictionary in theAttributesTab page. As shown below:

    1.png


    3. Set the widget style

    Select theDrop-down Box widget, clickMobile Terminal> Style Template, selectCustom for the attribute setting, and set the widget attribute. As shown below:

    2.png


    4. Effect view

    The preview effect of App and HTML5 is shown in the figure below:

    3.gif

    Template download: 

    [General]_Mobile_custom_widget_style1.frm

    III. Example 2: Use JS statement to change the color of the widget value

    Note: When modifying the color of the widget value, the attributes of the JavaScript statement is greater than the setting in the widget "style Template".

    1. Template preparation

    1) ClickFile>New Dashboard  in FineReport Designer.

    2) Drag aText Fieldwidget into the dashboard, the widget value is123, as shown in the figure below:

    4.png


    2 Add after initialization event

    There are 3 types of JavaScript codes for modifying the color of the widget value, namely:

    • this.css("color","red"); 

    • this.css("color","#00ff00"); 

    • thia.css("color","rgb(0,0,255)"); 

    Select theText Fieldwidget, clickEvent, and addAfter Initialization event. As shown below:

    5.png

    JavaScript 代码如下所示:

    this.css('color','#33FF33')

    3. Effect view

    The preview effect of App and HTML5 is shown in the figure below:

    6.png

    Template download: 

    [General]_Mobile_custom_widget_style2.frm

    Attachment List


    Theme: Fine Mobile
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback