Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    change skin dynamically.

    Hi,
    I want to change the skin dynamically for the whole application, is it possible?
    Please give me some hint.
    Thanks
    Sima

    Code:
    isc.DynamicForm.create({
    ID: "myform", 
        width: 600,colWidths:[300,130],
        numCols: 4,
        fields: [
            {name: "skin",
             title: "Look and Feel",
             type: "select",
             valueMap:{standard:"Standard",SmartClient:"SmartClient",Cupertino:"Cupertino",fleet:"Fleet"},
    
            defaultValue:"Cupertino",
            changed:function(){"CODE HERE"}
           }	
            
        ]
    });

    #2
    In SmartClient a skin can change not just color, but also the size and shape of elements, the type of widgets used (eg Button vs StretchImgButton), and even the number of elements involved (eg adding drop shadow). So a skin switch requires a page reload.

    If you happen to be using Java here's a simple way to make a .jsp take a "skin" URL parameter that allows switching skin.

    Code:
    <%
    String skin = request.getParameter("skin");
    if (skin == null) skin = "TreeFrog"; 
    %>
    <isc:loadISC skin="<%=skin%>"/>

    Comment

    Working...
    X