GetValue() not working after using SetHint on a TextCtrl

Hi,

I updated to wxPython 3.0.2.0 especially for the API SetHint. However, when I use SetHint on a TextCtrl, GetValue always returns empty string.

Please see the attached sample. I tested it on Ubuntu 14.04 32b.

On this sample, you can also see that once you type text in the “hinted” TextCtrl and then click on the other TextCtrl, the text is cleared.

Anyone knows if this is a bug, an expected behavior and if I can fix it somehow?

Thanks,

Francois.

sethint_getvalue.py (704 Bytes)

Well, there wasn’t many interest in this question :), but just in case someone else encounters the issue, here is the fix:

My event handlers prevented the text from being set in the control. You can see the corrected sample attached (added event.Skip(), and set the handler on the frame instead of the control).

Now, why isn’t this issue also present without hints is something I don’t know.

sethint_getvalue_fixed.py (758 Bytes)

···

On Wednesday, July 15, 2015 at 2:07:49 AM UTC+2, Francois Guibert wrote:

Hi,

I updated to wxPython 3.0.2.0 especially for the API SetHint. However, when I use SetHint on a TextCtrl, GetValue always returns empty string.

Please see the attached sample. I tested it on Ubuntu 14.04 32b.

On this sample, you can also see that once you type text in the “hinted” TextCtrl and then click on the other TextCtrl, the text is cleared.

Anyone knows if this is a bug, an expected behavior and if I can fix it somehow?

Thanks,

Francois.