wxPropertyGrid Related Queries Topic is solved

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
smartwhiz
In need of some credit
In need of some credit
Posts: 6
Joined: Fri Jul 24, 2009 6:26 pm

wxPropertyGrid Related Queries

Post by smartwhiz »

Hello,

As I couldn't get a queries answered on this component, I would like to start a thread only on the queries on this component.

Ok, I have made up this minimal application with this component with the major codes as follows :

Code: Select all

#include <wx/propgrid/propgrid.h>
#include <wx/propgrid/advprops.h>
#ifdef __VISUALC__
#include <wx/link_additions.h>
#endif //__VISUALC__


	m_Geometry_Properties_Sizer = new wxStaticBoxSizer( new wxStaticBox( m_Geometry_Panel, wxID_ANY, wxT("Geometry Properties") ), wxVERTICAL );

	m_propertyGrid1 = new wxPropertyGrid(m_Geometry_Panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_DEFAULT_STYLE);
	m_propertyGrid1->Append( new wxStringProperty(wxT("Label"),wxT("Name"),wxT("Initial Value")) );
	m_Geometry_Properties_Sizer->Add( m_propertyGrid1, 1, wxALL|wxEXPAND, 5 );

	m_Geometry_Sizer->Add( m_Geometry_Properties_Sizer, 1, wxEXPAND, 5 );
The weirdest part is that wxStringProperty is not getting identified, and from the online Class Reference at http://wxpropgrid.sourceforge.net/docs/ ... operty.htm
The definition is supposed to be in props.h, where props.h is not available on the wxPack (2.8.9.20).

I am getting an error of :

Code: Select all

 error C2061: syntax error : identifier 'wxStringProperty'
error C2143: syntax error : missing ';' before ')'
error C2143: syntax error : missing ';' before ')'
Which clearly shows that the compiler hasn't yet got the definition of wxStringProperty, this is the same with other properties too. Anyone knows a solution to this?

Thanks in-advance
Thanks and With Regards
Smartwhiz
smartwhiz
In need of some credit
In need of some credit
Posts: 6
Joined: Fri Jul 24, 2009 6:26 pm

Post by smartwhiz »

Ah, finally I found the answer to this query, thanks to Jaakko Salli (wxPropertyGrid Developer), wxPack seems to have the previous build of wxPropertyGrid. The following code have solved the issue.

Code: Select all

	m_propertyGrid1 = new wxPropertyGrid(m_Geometry_Panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_DEFAULT_STYLE);
	
	m_propertyGrid1->Append( wxStringProperty(wxT("Label"),wxT("Name"),wxT("Initial Value")) );
	m_Geometry_Properties_Sizer->Add( m_propertyGrid1, 1, wxALL|wxEXPAND, 5 );
Thanks for the support. Looking forward for more help from the community.
Thanks and With Regards
Smartwhiz
Post Reply