Results 1 to 7 of 7
  1.    #1  
    Hello,

    I trying to center the commandmenu at the bottom of an app. I tried something like aligh:"center" but it does not work.
    this.viewMenuModel = { label: $L('Menu Demo'), aligh:"center" ,
    items: [ {label: $L('menu'), items:[
    {label: $L('Services'), submenu:'category-menu1'},
    {label: $L('Tests'), submenu:'category-menu2'},
    {label: $L('BAC'), command:'bac'}
    ]},
    ]},


    Thanks for help !
  2. DrewPre's Avatar
    Posts
    818 Posts
    Global Posts
    829 Global Posts
    #2  
    aligh? Seriously?

    post the div tags surrounding the menu from your scene html file.

    Palm Pre Backup Utility...done!
    Locate Pre....done!
  3. #3  
    i have the following for my command menu:

    Code:
    this.controller.setupWidget(Mojo.Menu.commandMenu,
    	this.attributes = {
    		spacerHeight: 0,
    		menuClass: 'no-fade'
    	 },
    	 this.cmdMenuModel = {
    		 visible: false,
    		 items: [ {items:[
    			 { icon: "back", command: 'do-Undo'},
    			 { iconPath: "images/draw.png", command: "do-Draw"},
    			 { iconPath: "images/colors.png", command: 'do-Colors'},
    			 { iconPath: "images/pic.png", command: 'do-Pic'},
    			 { iconPath: "images/move.png", command: 'do-Move'},
    			 { icon: "stop", command: 'do-Close'} ]}
    		 ]
    	 }
    );
    had no need to use a div in the html cause there is no html. it's built into mojo. only difference is mine uses icons instead of labels. try this with labels instead of icon/iconPath and see if it works.
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix
  4.    #4  
    Thanks ! but it doesn't work.

    I've found a solution : put width: (320/3) on every items !
  5.    #5  
    Quote Originally Posted by DrewPre View Post
    aligh? Seriously?

    post the div tags surrounding the menu from your scene html file.
    There's no html div in mojo.comandmenu.
  6. #6  
    Put empty objects at both ends of your command menu items array.

    Code:
    items: [
        {},
        {label: 'CENTERED!', command: 'centerd-button'},
        {}
    ]
    Thats how I do it in preware anyways
  7.    #7  
    centerd-button
    It doesn't work. What do you put in handlecommand of this commandmenu.

Posting Permissions