7.1.5. Alignment

学习gtkmm有几周了,英语太烂了,硬着头皮边看边记,还没把握,发上来,大家斧正

7.1.5. Alignment

The Alignment widget allows you to place a widget at a position and size relative to the size of the Alignment widget itself. For instance, it might be used to center a widget.

Alignment(比例)能让你在相对Alignment自己的大小的一定位置、以一定的大小放置子控件。如:你可能常常居中放置子控件。

You need to specify the Alignment's characteristics to the constructor, or to the set() method. In particular, you won't notice much effect unless you specify a number other than 1.0 for the xscale and yscale parameters, because 1.0 simply means that the child widget will expand to fill all available space.

你需要在构造函数中或是通过set()方法指定对齐的参数。你将看不到很多的的效果,除非为xscale yscale指定不为1.0的值,因为1.0简单的理解为子控件充满整个活动空间。

参考

§  7.1.5.1. 示例

7.1.5.1. 示例

This example right-aligns a button in a window by using an Alignment widget.

这是使用Alignment控件让button在窗口中右对齐的例子。

7-5 Alignment

源代码

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值