[英]Is it possible to change the position of a Gtk.MessageDialog's caption text?
I'm working on a project where I use the Gtk.MessageDialog to get user input. 我正在使用Gtk.MessageDialog获取用户输入的项目中工作。
Now, it works , but there is one thing I'd like to change, and that is where the caption text is positioned within the dialog. 现在,它可以工作了 ,但是我想更改一件事,那就是标题文本在对话框中的位置。
Here's what it looks like right now: 现在是这样的:
I was wondering if I could move it down slightly so it looks more like this: 我想知道是否可以将其稍微向下移动,使其看起来像这样:
It's not a massive change, but I think it looks a little bit better. 这不是一个巨大的变化,但我认为它看起来要好一些。
Is this possible? 这可能吗?
I'm not familiar with the PyGTK API calls, but in C you can use 我不熟悉PyGTK API调用,但是在C语言中您可以使用
gtk_message_dialog_get_message_area ()
to get the container (box) of the messages (labels). 获取消息(标签)的容器(框)。 I imagine you can then apply padding and/or margin to the container to obtain what you want to achieve. 我想您可以将填充和/或边距应用于容器,以获取要实现的目标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.