Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Could it be posssible to add ability to assign custom text to bool property values, e.g. "Enabled", "Disabled" instead of default "True", "False" (or "Working", "Stopped"; "Male", "Female" and so on). It also should be translatable.
Do you mean globally, or on a property basis? There is already way to change bool choices globally using wxPropertyGridInterface::SetBoolChoices().
Also, this should be trivial for you to implement by simply using wxEnumProperty instead of wxBoolProperty, so this is really not a high-priority issue.
Ok, thanks for advice. I'll try one of your tips until ticket isn't implemented.
Since this should be quite trivial to implement efficiently with wxEnumProperty, I'm not going to add this feature (unless somebody else requests it as well).
Here's a snippet that should pretty much work:
// Let's prepare our custom bool choices
// Store custom choices
m_myBoolChoices = myBoolChoices;
// Add new property with our choices
pg->Append( wxEnumProperty(proplabel, propname, m_myBoolChoices, int(myBoolValue)) );
// Get bool value from property
bool myBoolValue = pg->GetPropertyValue(propname).GetLong() ? true : false;