remove a ofxgui slider object?

Hi list,

I’m using the ofxGui class on ofx500 and it is gorgeous!

I’d like to be able to remove a certain gui object after a certain event occurs while leaving the rest active. Is it possible? I was thinking I could have 2 ofxGui’s but was not sure how to deal with the ofxguilisteners since I’d have them pointing at the same thing! Is there a way to have 2 ofxGui’s? or a removePanel object I missed?

Any help would be appreciated!

Thanks!

This seems to work for me… but I know I read in another post that you are all working on it!

add to ofxgui.h

  
void removePanel(int id)  

add to ofxgui.cpp

  
void ofxGui::removePanel(int id)  
{	  
	for(vector<ofxGuiObject*>::iterator it = mObjects.begin(); it < mObjects.end(); it++)  
	{  
		if( (*it)->mParamId == id )  
		{  
			mObjects.erase(it-1, it);  
			break;  
		}  
	}  
}