User forums > General (but related to Code::Blocks)
More ColourDialog fun
Skywise:
CodeBlocks 13.12 - wxWidgets 3.0.0 static
On windows, color dialogs have an option for custom colors.
When adding a ColourDialog to a frame via wxSmith, there is a check box option 'Full dialog'. Checking this is supposed to bring up the full color dialog with custom colors already opened. For example, the ColorPickerCtrl does this.
However, it doesn't work.
When unchecked, the frame constructor has the line,
__ColourData_1.SetChooseFull(false);
which turns off the custom colors.
When checking the box, this line is removed completely, so the dialog is left to the default which is the same condition, no custom colors.
Instead, it should change the boolean to true. Manually doing this gives me the desired behavior, but of course it gets deleted when I make any changes to the frame.
I've only tested this on XP so don't know if it's across windows versions or not.
Brian
oBFusCATed:
You can place the code outside the wxSmith block and it won't get deleted. Otherwise it is better to post a patch, I doubt it would be that hard to do.
Skywise:
--- Quote from: oBFusCATed on July 12, 2014, 12:01:37 pm ---You can place the code outside the wxSmith block and it won't get deleted.
--- End quote ---
If you mean the commented out block in the constructor, just tried and it doesn't have any effect.
--- Quote from: oBFusCATed on July 12, 2014, 12:01:37 pm --- Otherwise it is better to post a patch, I doubt it would be that hard to do.
--- End quote ---
Even though I've been programming for decades, I'm basically a noob to wxWidgets, CodeBlocks, and C++. I'm still in that "I know enough to be dangerous" stage.
So I figured mentioning it would let someone else who knows what they're doing fix it.
Brian
Jenna:
The wxxWidgets docs state clearly that the default value is true !
Testing it with "GetChooseFull()" always returns "false", so the docs seem to be incorrect or the implementation is buggy.
As workaround you can add "ColourDialog1->GetColourData().SetChooseFull(true);" as "Extra code" of the wxColourDialog in wxSmith.
You have to fix the name of the dialog so it fitsyour settings.
Skywise:
--- Quote from: jens on July 12, 2014, 11:27:26 pm ---As workaround you can add "ColourDialog1->GetColourData().SetChooseFull(true);" as "Extra code" of the wxColourDialog in wxSmith.
You have to fix the name of the dialog so it fitsyour settings.
--- End quote ---
Thank you!!! I'm happy with this.
I was trying to figure out that solution but couldn't figure out the correct format.
I'm still struggling with C's obsession with pointers. As I said, I'm a noob. ;D
Brian
Navigation
[0] Message Index
[#] Next page
Go to full version