<p>I am making a little GUI frontend for a app at the moment using wxPython.</p>

<p>I am using <code>wx.StaticText()</code> to create a place to hold some text, code below:</p>

<pre><code>content = wx.StaticText(panel, -1, "Text Here", style=wx.ALIGN_CENTRE)
</code></pre>

<p>I have a button when clicked retrieves data from MySQL, I am wanting to change the value of the <code>StaticText()</code> to the MySQL data or what else could I use the hold the data.</p>

<p>I have tried using the below method: </p>

<pre><code>contents = wx.TextCtrl(bkg, style=wx.TE_MULTILINE | wx.HSCROLL)
content.SetValue("New Text")
</code></pre>

<p>This displays the data fine but after the data is loaded you can edit the data and I do not want this.</p>

<p>Hope you guys understand what I am trying to do, I am new to Python :)</p>

<p>Cheers</p>

```
wx.TextCtrl
```
has a style called
```
wx.TE_READONLY
```
. Use that to make it read-only.
As a sidenode, you can use the
C++ wxWidgets Manual
for wxPython aswell. Where special handling for wxPython or other ports is required, the manual often points out the difference.