In my level editor an entity can have arbitrary properties. So I need to display relevant properties when an entity is selected.
So whats the proper way to do this?
Delete all properties and reAppend again with relevant? is this the usual way?
Is this an Ogre of wxWidgets question? You should definitly not delete ogre properties if that is what you are asking.
No, entity properties can be like
GameEntity A properties : Power, Speed, ModelName
GameEntity B properties : Height, Health, ModelName
So when in level editor I select either of them, I want to display only the relevant properties in the wxPropertyGrid UI.
So is ik ok to delete all properties and reappend wxProperties for Entity A or B.
Sounds like a wxWidgets question to me and we aren't a wxWidgets forum. That said the easiest way is to rebuild the list the whole time but you could also just compare both sets of properties and modify the list as needed. If wxPropertyGrid is coded properly it should handle recreating of its contents fine.
I dont feel comfortable with wxwidgets mailing list but thanks for answers, im totally new to wxwidgets or gui stuff.
I will recreate the list.
I would suggest using the wxWidgets Forum
in future, its just as friendly as here.