No matter what I do, the dialog always returns the foreground colour of a text control. There is no mention of the foreground colour in that function but wxWidgets magically gets it to return it.
I have tried with both wxColourDialog and wxGetColourFromUser. I mean, it's a simple as you can get:
Code: Select all
wxColour clr = wxGetColourFromUser(this, *wxRED, "Please choose the background colour");
if ( clr.IsOk() ) std::cout << "clr = " << clr.GetAsString() << "\n";
It doesn't help that Apple's stupid colour picker doesn't have accept/cancel buttons.
Also, if I use wxColourDialog, the dialogue decides by itself to pop up on launch next time I run the app. How on earth to tell it to shut up?
I also tried binding the wxEVT_COLOUR_CHANGED event, but that didn't work at all.
I found a thread possibly talking about the issue from 2012, but it goes nowhere.
https://groups.google.com/g/wx-dev/c/g6ocx9t7Ufc
I have had the colour picker work in previous projects, it's just being a bitch this time. No idea what else I can try.
Has anyone else run into this problem?