python - GtkLabel 对齐和填充

标签 python pygtk glade

我在 Glade 中有 GtkLabel,X 对齐设置为 0,X 填充设置为 5,扩展设置为否。

标签与旋转按钮和另一个标签一起位于水平框下方。

问题是 X pad 应用于左侧和右侧。

我希望它只应用于右侧。

我做错了什么?

最佳答案

Xpad 应用于左侧和右侧。

格莱德 3.10

如果您只想在右边留出边距,请更改 Common 选项卡中可用的 Margin on the right:

enter image description here

格莱德 3.8

右键单击 GtkLabel 小部件并选择 Add Parent->Alignment。单击 GtkAlignment 小部件并将 RightPadding 设置为所需的值。

enter image description here

关于python - GtkLabel 对齐和填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8456556/

相关文章:

python - 动态更新 gtk.VBox

javascript - 使用 Node.js 执行 Python 脚本

python - 从 Flask 路由中的 wtforms FormField 获取数据

php - 如何检测图像中的 'image area' 百分比?

python - 回调函数中的 AttributeError

video - 在 Windows 上获取 gtk.gdk.window.handle

python - 我如何在 Python 应用程序之上创建一个 GUI,以便它可以执行 GUI 或 CLI?

python - 使用 Glade 和 Python (Gtk) 构建的 GUI 的本地化

c++ - 通过代码在 glade 中设置 Tree Store 模型 - GTK Glade TreeStore C++

python - 计算需要多少行才能加起来一个值