Adam,

could you please make a Playground example out of your code?

T.

On 09/10/2010 06:46 PM, mmbolido Gazeta.pl wrote:
> Hi,
> 
> I have problem with centering on one of many qx.ui.container.Stack
> pages. Same example (based on MultiPageForm demo):
> 
> qx.Class.define("demobrowser.demo.ui.MultiPageForm",
> {
>   extend : qx.application.Standalone,
> 
>   members :
>   {
>     main : function() {
>       this.base(arguments);
> 
>       // create the ui ///////////////////////
> 
>       // create the stack for the multi page view
>       var stack = new qx.ui.container.Stack();
>       this.getRoot().add(stack, {edge:0});
> 
>       // page 1
>       var grid1 = new qx.ui.layout.Grid();
>       grid1.setSpacing(5);
>       var page1 = new qx.ui.container.Composite(grid1);
>       stack.add(page1, {top: "50%", left: "50%"});
> 
>       // name
>       var nameLabel = new qx.ui.basic.Label("Name:");
>       page1.add(nameLabel, {row: 0, column: 0});
>       var name = new qx.ui.form.TextField();
>       name.setRequired(true);
>       page1.add(name, {row: 0, column: 1});
> 
>       // password
>       var passwordLabel = new qx.ui.basic.Label("Password:");
>       page1.add(passwordLabel, {row: 1, column: 0});
>       var password = new qx.ui.form.PasswordField();
>       password.setRequired(true);
>       page1.add(password, {row: 1, column: 1});
> 
>       // nextbutton
>       var nextButton = new qx.ui.form.Button("next");
>       page1.add(nextButton, {row: 2, column: 1});
>       nextButton.addListener("execute", stack.next, stack);
> 
>       // page 2
>       var grid2 = new qx.ui.layout.Grid();
>       grid2.setSpacing(5);
>       var page2 = new qx.ui.container.Composite(grid2);
>       stack.add(page2, {top: 0, left: 0});
> 
>       // email
>       var emailLabel = new qx.ui.basic.Label("Email:");
>       page2.add(emailLabel, {row: 0, column: 0});
>       var email = new qx.ui.form.TextField();
>       page2.add(email, {row: 0, column: 1});
> 
>       // birth date
>       var birthDateLabel = new qx.ui.basic.Label("Birthdate:");
>       page2.add(birthDateLabel, {row: 1, column: 0});
>       var birthDate = new qx.ui.form.DateField();
>       birthDate.setRequired(true);
>       page2.add(birthDate, {row: 1, column: 1});
> 
>       //backbutton
>       var backButton = new qx.ui.form.Button("back");
>       page2.add(backButton, {row: 2, column: 0});
>       backButton.addListener("execute", stack.previous, stack);
> 
>       // submit
>       var submitButton = new qx.ui.form.Button("submit");
>       submitButton
>       page2.add(submitButton, {row: 2, column: 1});
> 
> //... CUT ;-)
> 
> Like you see, I want to center first page content:
> stack.add(page1, {top: "50%", left: "50%"});
> 
> but second page should be on (0, 0) position:
> stack.add(page2, {top: 0, left: 0});
> 
> Unfortunately, this doesn't work:/ What I doing wrong?
> 
> Best regards,
> Adam
> 
> 
> 
> ------------------------------------------------------------------------------
> Automate Storage Tiering Simply
> Optimize IT performance and efficiency through flexible, powerful, 
> automated storage tiering capabilities. View this brief to learn how
> you can reduce costs and improve performance. 
> http://p.sf.net/sfu/dell-sfdev2dev
> 
> 
> 
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to