Search code examples
python-3.xgtkgtk3messagedialog

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.

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:

enter image description here

I was wondering if I could move it down slightly so it looks more like this:

enter image description here

It's not a massive change, but I think it looks a little bit better.

Is this possible?


Solution

  • I'm not familiar with the PyGTK API calls, but in C you can use

    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.