首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将MigLayouts转换为XGrid?

如何将MigLayouts转换为XGrid?
EN

Stack Overflow用户
提问于 2010-02-09 23:13:43
回答 1查看 60关注 0票数 0

如何使用JFXtras6中的XGrid编写以下代码?

代码语言:javascript
复制
Stage {
  title: "Mig Centering Test"
  scene: Scene {
    width: 200
    height: 200
    fill: Color.PINK

    content: MigLayout {
      fitParent: true
      layout: "fill"
      migContent: MigNode {
        constraints: "center"
        node: Rectangle {
          width: 100
          height: 100
        }
      }
    }
  }
}

我最初的猜测是,它将涉及大量的XLayoutInfo和XGridLayoutInfo。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-02-09 23:27:14

事实证明答案很简单:

代码语言:javascript
复制
Stage { 
   title: "XGrid Centering Test"
   scene: XScene {
      width: 200
      height: 200
      fill: Color.PINK
      content: XGrid {
         rows: [
                 row([Rectangle {
                       height: 100
                       width: 100
                     }])
         ]
      }
   }
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2230068

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档