Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我正在使用 GTKMM 制作应用程序。截图如下:
截屏
问题是,我无法将“我的标签”定位在顶部对齐,就在搜索框的下方。
我是把Name,Search box,Search Button打包进一个HBox,HBox打包进一个VBox,然后MyLabel打包进VBox。
我认为问题在于 VBox 为两行分配了相等的高度,所以即使我将 MYLabel 对齐到顶部,但它的顶部是屏幕的中间,因为 VBox 平均分配了两行之间的高度。
有没有办法设置 VBox 行的高度?或任何其他出路?
将标签的"expand"和属性设置为。"fill"false
"expand"
"fill"
false