Is it possible to use pango markup text on a Gtk+ 3 toolbutton label using Glade and PyDev?
<p>I have put together a Gtk+ interface in Glade and part of the UI is a tool palette with several toolbuttons using utf-8 characters as labels.  They work fine in the default font, but I would like to change font details using pango markup.  This is straightforward when dealing with a label as such, as one can apply</p>

<pre><code>label.set_markup(pangoMarkupString)
</code></pre>

<p>but the label in a toolbutton can not, as far as I can tell, be addressed directly in this way.  A naive</p>

<pre><code>button.label.set_markup(pangoMarkupString)
</code></pre>

<p>naturally doesn't work and returns an error saying that <em>toolbuttons</em> do not have the <em>label</em> property.  Is there any way to use pango parsed text in a toolbutton, and what depth of python trickery would be required at the application end?</p>

<p>To save any others from hours of fruitless head-scratching and searching, and to open the eyes of other newbies to the powers of Gtk+ 3 and Glade, I present the solution I found.</p>

<ol>
<li>Right click on your tool palette in the <em>outliner</em> and select edit</li>
<li>Choose the hierarchy tab in the editor</li>
<li>Select your button in the hierarchy <em>outliner</em></li>
<li>Under <strong>Label</strong> properties choose <em>widget</em> rather than <em>text</em></li>
<li>Click on the selector icon at the right of the widget entry box</li>
<li>Add a new widget</li>
<li>Leave the tool palette editor</li>
<li>Select <em>label1</em>, the new widget you created in the <em>outliner</em></li>
<li>You can now edit its id, label text and attributes</li>
</ol>

<p>I don't need it yet, but I wonder how to do this with a regular button...</p>

python pygtk gtk3 glade pango