Sigma Php Ajax framework, Ajax Components, GUI Builder
May 21, 2012, 10:47:01 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: CustomStyle in a Stacks object not working  (Read 280 times)
FurBurger
Jr. Member
**
Posts: 5


View Profile
« on: October 19, 2011, 01:45:56 AM »

The customStyle for a Stacks object doesn't seem to work if I create it as a key/value pair:

var MainMenu = new linb.UI.Stacks
        ({
            items:[{"id":"Analysis"}, {"id":"Data Capture"}, {"id":"Setup"}],
            customStyle:{"KEY":"font-size:24pt;font-weight:bold", "CAPTION":"font-size:24pt"},       
            left:0,
            top:0,
            value:"Analysis"
        })
        .show();

But it DOES work if use the SET/GET notation:


append(
                (new linb.UI.Stacks)
                .setHost(host,"ctl_stacks1")
                .setItems([{"id":"a", "caption":"page1"}])
                .setDock("none")
                .setLeft(0)
                .setTop(0)
                .setValue("a")
                .setCustomStyle({"KEY":"font-size:24pt", "CAPTION":"font-size:24pt"})
            );
Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #1 on: October 19, 2011, 02:35:44 AM »

I tested your code, it works well.
Logged
FurBurger
Jr. Member
**
Posts: 5


View Profile
« Reply #2 on: October 19, 2011, 02:57:06 AM »

That's strange.

See attached image.

When I insert this code into index.js, I get no font change:
           
var MainMenu = new linb.UI.Stacks
        ({
            items:[{"id":"Analysis"}, {"id":"Data Capture"}, {"id":"Setup"}],
            customStyle:{"KEY":"font-size:24pt;font-weight:bold", "CAPTION":"font-size:24pt"},       
            left:0,
            top:0,
            width:150,
            height:400,
            dock:"none",
            value:"Analysis"
        })
        .show();

Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #3 on: October 19, 2011, 05:24:54 PM »

var MainMenu = new linb.UI.Stacks(
// prop
        {
            items:[{"id":"Analysis"}, {"id":"Data Capture"}, {"id":"Setup"}],       
            left:0,
            top:0,
            width:150,
            height:400,
            dock:"none",
            value:"Analysis"
        },
//events
        null,
//host
        null,
//theme
        null,
//custom style
        {"KEY":"font-size:24pt;font-weight:bold", "CAPTION":"font-size:24pt"},
//custom class
        null,
//custom behavior
        null,
//custom functions
        null
)
        .show();
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!