[wxPython-users] Any way to disable this graphical glitch?

Andrea Gavana andrea.gavana at gmail.com
Mon Dec 3 02:52:38 PST 2007


Hi Laurent,

On Dec 2, 2007 11:28 PM, Laurent Dufrechou wrote:
> Hi,
> I'm using a wx.TextCtrl with a black background.
> Let say my TextCtrl instance is 't'.
> When I do t.Remove(t.GetLastPosition()-10, t.GetLastPosition())
> The text is selected THEN it is deleted.
> As the selection color is Blue it makes a graphical glitch.
>
> Is there a way to set selection color to background color or perhaps another
> way to avoid the glitch??

You could try to use something like:

yourTextCtrl.Freeze()

# your code to delete text and whatever you want here

yourTextCtrl.Thaw()

and see if it does what you want :-D

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/




More information about the wxpython-users mailing list