Problems with text control on OS X

21 views
Skip to first unread message

Chris Norman

unread,
Mar 2, 2015, 3:36:40 AM3/2/15
to wxpytho...@googlegroups.com
Hiya all,
I’m having a bit of a struggle wrestling wx.TextCtrl into shape on Mac OS X (latest).

My first, and most significant problem, is that wx.TextCtrl.PositionToXY doesn’t seem to work on this platform, returning some ridiculously high numbers. Is this a known thing?

Secondly, wx.TE_PROCESS_ENTER seems to be completely ignored. I’m having to use wx.WXK_KEY_UP, and check if it’s the enter key with no modifiers.

Are there any work around for either of these problems?

Cheers,


Take care,

Chris Norman

Robin Dunn

unread,
Mar 6, 2015, 8:35:27 PM3/6/15
to wxpytho...@googlegroups.com
Chris Norman wrote:
> Hiya all,
> I’m having a bit of a struggle wrestling wx.TextCtrl into shape on Mac
> OS X (latest).
>
> My first, and most significant problem, is that wx.TextCtrl.PositionToXY
> doesn’t seem to work on this platform, returning some ridiculously high
> numbers. Is this a known thing?

It doesn't look like it is implemented on Mac. The stub implementation
simply returns False and doesn't touch the x and y values, which is why
you are seeing garbage values there.

>
> Secondly, wx.TE_PROCESS_ENTER seems to be completely ignored. I’m having
> to use wx.WXK_KEY_UP, and check if it’s the enter key with no modifiers.
>

It looks like it is supposed to be working, but I can confirm that it
doesn't. I'll dig into it a little more.

--
Robin Dunn
Software Craftsman
http://wxPython.org

Chris Norman

unread,
Mar 8, 2015, 7:14:44 AM3/8/15
to wxpytho...@googlegroups.com
Hi,

On 07/03/2015 01:35, Robin Dunn wrote:
> Chris Norman wrote:
>> Hiya all,
>> I’m having a bit of a struggle wrestling wx.TextCtrl into shape on Mac
>> OS X (latest).
>>
>> My first, and most significant problem, is that wx.TextCtrl.PositionToXY
>> doesn’t seem to work on this platform, returning some ridiculously high
>> numbers. Is this a known thing?
>
> It doesn't look like it is implemented on Mac. The stub
> implementation simply returns False and doesn't touch the x and y
> values, which is why you are seeing garbage values there.

I just wrote a PositionToXY function for my custom class which seems to
work. Is there a way I can submit it for possible inclusion in the mail
project? It would be nice to contribute some code to WX, and it's not
very often I make something I think will be useful! :-)
>
>>
>> Secondly, wx.TE_PROCESS_ENTER seems to be completely ignored. I’m having
>> to use wx.WXK_KEY_UP, and check if it’s the enter key with no modifiers.
>>
>
> It looks like it is supposed to be working, but I can confirm that it
> doesn't. I'll dig into it a little more.

Thank you. As I say, I have it working with wx.WXK_KEY_*, but I'd have
thought wx.TE_PROCESS_ENTER should be respected.

Reply all
Reply to author
Forward
0 new messages