CSS Implements Drop-down Tree Directory

  • Last update:  2020-12-17
  • I. Overview

    1.1 Requirement

    How to create a drop-down tree directory with CSS:

    1.gif 

     

    1.2 Solution

    Use the Tree Node Button widget and Reference CSS to create a drop-down tree directory.

    II. Sample

    2.1 Design a report

    1) Drag data fields main, sub and sub2 of the built-in dataset into B3, B4 and B5 respectively. Add a Tree Node Button widget to B3, B4 and B5 respectively.

    2)Set B3 as the left parent cell of B4 and set B4 as the left parent cell of B5.

     

     

    2.2 Reference CSS

    1)Unzip the image file image.zip of the drop-down tree button to the directory %FR_HOME%\webroot\scripts\css.

    2)Add a tree.css file to the directory FineReport_10.0\webapps\webroot\scripts\css by inputting the following codes:

    .x-treenode-expand {
        background: transparent url('/webroot/scripts/css/5.jpg') no-repeat scroll left center;
        padding-left: 40px; 
    }
    .x-treenode-unexpand {
        background: transparent url('/webroot/scripts/css/4.jpg') no-repeat scroll left center;
        padding-left: 40px;
    }
    .x-text {
        color: #FFFFFF;
    }

    3)In the Designer, select [Template]-[Web Attributes]-[Reference Css] to import a Css file.

    4.png 

     

    2.3 Preview

    Save the template and select [Data Analysis]. The preview effect is shown as below:

    5.gif 

    III. Download template, image and file

    Attachment List


    Theme: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy