hi all, it seems is not possibile to change the background colour of a
disabled textctrl. You can verify it with the demo, just putting
(py2.5, wxpy 2.8.10.1, Vista):
t1.Enable(False)
t1.SetBackgroundColour(wx.BLACK)
Can you suggest me a workaround for this? Leaving t1.Enable(True) but
eating all the key pressing trying to change the textctrl value has
drawbacks? Or is there something more straightforward?
On Nov 12, 4:29 pm, Marco Prosperi <marcoprosperi...@gmail.com> wrote:
hi all, it seems is not possibile to change the background colour of a
disabled textctrl. You can verify it with the demo, just putting
(py2.5, wxpy 2.8.10.1, Vista):
t1.Enable(False)
t1.SetBackgroundColour(wx.BLACK)
Can you suggest me a workaround for this? Leaving t1.Enable(True) but
eating all the key pressing trying to change the textctrl value has
drawbacks? Or is there something more straightforward?
thanks in advance,
Marco
My guess is that this is a limitation with the native text control.
Did you try changing the color before disabling it?
On 13 Nov, 15:30, Mike Driscoll <kyoso...@gmail.com> wrote:
Hi Marco,
On Nov 12, 4:29 pm, Marco Prosperi <marcoprosperi...@gmail.com> wrote:
> hi all, it seems is not possibile to change the background colour of a
> disabled textctrl. You can verify it with the demo, just putting
> (py2.5, wxpy 2.8.10.1, Vista):
> Can you suggest me a workaround for this? Leaving t1.Enable(True) but
> eating all the key pressing trying to change the textctrl value has
> drawbacks? Or is there something more straightforward?
> thanks in advance,
> Marco
My guess is that this is a limitation with the native text control.
Did you try changing the color before disabling it?
The only other idea I have is to use the read-only style, but it looks like that only has effect when used with the constructor, you can't switch it back and forth after the widget has been created.
···
On 11/12/09 2:29 PM, Marco Prosperi wrote:
hi all, it seems is not possibile to change the background colour of a
disabled textctrl. You can verify it with the demo, just putting
(py2.5, wxpy 2.8.10.1, Vista):
t1.Enable(False)
t1.SetBackgroundColour(wx.BLACK)
Can you suggest me a workaround for this? Leaving t1.Enable(True) but
eating all the key pressing trying to change the textctrl value has
drawbacks? Or is there something more straightforward?