Topic
  • 2 replies
  • Latest Post - ‏2014-02-09T18:23:09Z by FadyRamzy
FadyRamzy
FadyRamzy
29 Posts

Pinned topic Is it possible to reference more than one CSS file in RUI handler?

‏2013-11-19T09:16:07Z |

Hello All,

I want to reference multiple css files in my widget, how to do that?

handler HeaderTemplate type RUIWidget {targetWidget = ui, onConstructionFunction = start, cssFile="css/pifssRUI.css", @VEWidget{ category = "Custom" }}

 

 

  • Smyle Z. Huang
    Smyle Z. Huang
    13 Posts
    ACCEPTED ANSWER

    Re: Is it possible to reference more than one CSS file in RUI handler?

    ‏2013-12-23T02:32:22Z  

    Sure, you can include multiple css files in a separate in a html file, and assign the includeFile property of your widget to refer to this file.

    Here is a simple example:

    handler a type RUIhandler {initialUI = [ ui ],onConstructionFunction = start, title="pkg", includeFile="runtime.html"}
    ui GridLayout{ columns = 3, rows = 4, cellPadding = 4, children = [] };
    function start()
    end 
    end
    

     

    And in runtime.html, you have following codes there.

    <link href="css/a.css" type="text/css" rel="stylesheet" media="screen" />
    <link href="css/b.css" type="text/css" rel="stylesheet" media="screen" />
    
     
  • Smyle Z. Huang
    Smyle Z. Huang
    13 Posts

    Re: Is it possible to reference more than one CSS file in RUI handler?

    ‏2013-12-23T02:32:22Z  

    Sure, you can include multiple css files in a separate in a html file, and assign the includeFile property of your widget to refer to this file.

    Here is a simple example:

    handler a type RUIhandler {initialUI = [ ui ],onConstructionFunction = start, title="pkg", includeFile="runtime.html"}
    ui GridLayout{ columns = 3, rows = 4, cellPadding = 4, children = [] };
    function start()
    end 
    end
    

     

    And in runtime.html, you have following codes there.

    <link href="css/a.css" type="text/css" rel="stylesheet" media="screen" />
    <link href="css/b.css" type="text/css" rel="stylesheet" media="screen" />
    
     
  • FadyRamzy
    FadyRamzy
    29 Posts

    Re: Is it possible to reference more than one CSS file in RUI handler?

    ‏2014-02-09T18:23:09Z  

    Sure, you can include multiple css files in a separate in a html file, and assign the includeFile property of your widget to refer to this file.

    Here is a simple example:

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript">handler a type RUIhandler {initialUI = [ ui ],onConstructionFunction = start, title="pkg", includeFile="runtime.html"} ui GridLayout{ columns = 3, rows = 4, cellPadding = 4, children = [] }; function start() end end </pre>

     

    And in runtime.html, you have following codes there.

    <pre class="html dw" data-editor-lang="js" data-pbcklang="html" dir="ltr"><link href="css/a.css" type="text/css" rel="stylesheet" media="screen" /> <link href="css/b.css" type="text/css" rel="stylesheet" media="screen" /> </pre>
     

    Thank you very much