Howto disable popup in wxtextctrl Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
mybofy
Knows some wx things
Knows some wx things
Posts: 38
Joined: Fri Aug 07, 2015 2:09 pm

Howto disable popup in wxtextctrl

Post by mybofy »

Bonjour
macOS 14.14 - wxwidgets 3.1.2
hostValue = new wxTextCtrl(panel0, ID_Host, wxEmptyString);
When I enter a text which is the same as the name of my application in lowercase, I have a popup which propose the text with the fisrt letter in uppercase !
It is not very important, but it is very annoying.

NB : very strange : if I enter the word wherbarium (in lower case), it is transformed in Wherbarium.
Probably not a problem in wxWidgets, but in std macOS editor for Safari+phpBB, Xcode, others ?

Merci de l'aide.
Last edited by mybofy on Sun Apr 07, 2019 9:37 am, edited 1 time in total.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Howto disable popup in wxtextctrl

Post by doublemax »

This is a feature of the underlying native control.

I found this undocumented function in the source, but i can't test it:

Code: Select all

void wxTextCtrl::MacCheckSpelling(bool check)
Use the source, Luke!
mybofy
Knows some wx things
Knows some wx things
Posts: 38
Joined: Fri Aug 07, 2015 2:09 pm

Re: Howto disable popup in wxtextctrl

Post by mybofy »

Merci

There somethings in wxSystemOptions

But nor
wxSystemOptions::SetOption( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER, 0 );
nor
hostValue->MacCheckSpelling(false);
working.

A search on the net show this is mentionned : it should work ?
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Howto disable popup in wxtextctrl

Post by doublemax »

There are two other methods in NSTextView:

Code: Select all

- (void)setAutomaticSpellingCorrectionEnabled:(BOOL)flag
- (void)setAutomaticTextReplacementEnabled:(BOOL)flag
But wxWidgets provides no interface to them.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Howto disable popup in wxtextctrl

Post by ONEEYEMAN »

Hi,
You can try sending E-mail to wx-users - maybe OSX maintainer (Stefan) will reply with some suggestion?

Also - did you try the text sample that comes with the wxWidgets?

Thank you.
mybofy
Knows some wx things
Knows some wx things
Posts: 38
Joined: Fri Aug 07, 2015 2:09 pm

Re: Howto disable popup in wxtextctrl

Post by mybofy »

Merci

I just send mail to wx-users.

The text sample : the m_text has the same behavior.
Nothing change when I add
wxSystemOptions::SetOption( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER, 0 );
in init()
or
m_test->MacCheckSpelling(false);
in MyPanel::MyPanel

More ?
mybofy
Knows some wx things
Knows some wx things
Posts: 38
Joined: Fri Aug 07, 2015 2:09 pm

Re: Howto disable popup in wxtextctrl

Post by mybofy »

My last assumptions where good : wxWidgets was not concerned
The problem is at the level of the management of the keyboard in macOS 14.14.
Open  > System preferences > Keyboard > Text
There is a kind of dictionnary with a list of words to remplace by ...
The word Wherbarium was there ! I suppress it and all become OK.

Grand merci à tous et désolé pour mon mauvais anglais.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Howto disable popup in wxtextctrl

Post by ONEEYEMAN »

Hi,
As long as your application is internal this is a good solution.
However if your application is meant to go out - that's a different story.

Thank you.
Post Reply