在GtkCheckButton或GtkRadioButton标签中换行 [英] Line wrapping in GtkCheckButton or GtkRadioButton labels

查看:156
本文介绍了在GtkCheckButton或GtkRadioButton标签中换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何方法可以获得 GtkCheckButton GtkRadioButton 的标签,当其父容器调整大小时

Is there any way to get the label of a GtkCheckButton or GtkRadioButton to wrap when its parent container is resized small enough so the label won't fit on one line?

推荐答案

您可以访问按钮的子窗口小部件 - 它是 GtkLabel 在默认设置, - 并设置各种属性,例如 wrap 。然而,由于在GTK + 2.x中没有宽度布局协商,所以你想要的是很难/接近不可能实现。请注意,您也可以替换按钮的子项。

You can access button's child widget — it's a GtkLabel in default setup, — and set various properties on it, e.g. wrap. However, since there is no height-for-width layout negotiation in GTK+ 2.x, what you want exactly can be difficult / close to impossible to achieve. Note that you can also replace the button's child if you want.

这篇关于在GtkCheckButton或GtkRadioButton标签中换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆