wxPython issue in changing button text
<p>I am working on a wxPython app where I have a button with label text 'Allocate'. Additionally I also have 2 radio options on my app namely 'UnAllocated' and 'Allocated'. When the app launches by default the radio option 'UnAllocated' is selected and the button has label text as 'Allocate'. I have made event driven code to change the label text of the button from 'Allocate' to 'Re-Allocate' upon selecting the radio option 'Allocated'. Uptill now everything is fine and code works as intended.</p>

<p>Now the problem is in the event of radio option 'Allocated' the button label does gets a new label text as 'Re-Allocate' however it is overwriting the previous label text instead of changing. Then as soon as I bring my mouse cursor on the button the text gets refreshed and appears clean and clear. Below is my Code</p>

<pre><code>def rdoAllocated_Click(self, event):
    self.btn_Allocate.SetLabelText('Re-Allocate')

def rdoUnAllocated_Click(self, event):
    self.btn_Allocate.SetLabelText('Allocate')
</code></pre>

<p>is there a way of refreshing the button label text automatically after the change to display clearly the new text instead of unreadable overwritten text.
<a href="http://i.stack.imgur.com/XEBHA.png" rel="nofollow">Here is the image how it looks when getting updated</a></p>