【问题标题】:How to align a dhtml button to the right如何将 dhtml 按钮向右对齐
【发布时间】:2015-05-15 05:04:51
【问题描述】:

我有这个按钮:

{ type:"button", name:"map_button", value:"在地图中显示", width: 100, enabled:false },

我可以使用什么命令将其向右对齐?我试过了:

{ type:"button", name:"map_button", align:"right", value:"在地图中显示", width: 100, enabled:false },

它不起作用。我不确定它还能是什么

【问题讨论】:

  • 您找到解决方案了吗?
  • 好的,谢谢! offsetLeft 工作。

标签: forms button dhtml dhtmlx


【解决方案1】:

我相信您可能正在寻找“offsetLeft”属性:

{ type:"button", name:"map_button", offsetLeft:100, value:"在地图中显示", width: 100, enabled:false }

另外,您可能想尝试使用此链接中的“位置”属性: http://docs.dhtmlx.com/form__positioning.html

【讨论】:

    【解决方案2】:

    你可以使用类似的东西:

    {type:'block',name:'block_button',list:[
    {type:"button", name:"map_button",value:"显示在 地图",宽度:100,启用:false } ]
    }

    声明表格后:

    name_form._getItemByName('block_button').style.float='right'

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-06-13
      • 1970-01-01
      • 1970-01-01
      • 2019-01-16
      • 2015-12-15
      • 2018-05-07
      • 1970-01-01
      • 2015-11-13
      相关资源
      最近更新 更多