wxpropertygrid multiple columns Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Knows some wx things
Knows some wx things
Posts: 41
Joined: Sat Aug 22, 2009 12:02 pm

wxpropertygrid multiple columns

Post by hackish » Tue Sep 25, 2012 6:23 am

I've created a wxpropertygrid and using pgrid->SetColumnCount(3) I've managed to create 3 columns.

How can I access this extra column so an additional property can be displayed in it? Does the extra column sort of belong to the wxFloatProperty I create for that row? In my case I want to add units to the last column (mph).

propgrid.jpg (6.3 KiB) Viewed 1217 times

User avatar
Posts: 14509
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxpropertygrid multiple columns

Post by doublemax » Tue Sep 25, 2012 7:42 am

From the "propgrid" sample:

Code: Select all

pg->Append( new wxIntProperty(wxT("Width"),wxPG_LABEL,640) );
pg->SetPropertyAttribute(wxT("Width"), wxPG_ATTR_MIN, (long)10 );
pg->SetPropertyAttribute(wxT("Width"), wxPG_ATTR_MAX, (long)2048 );
pg->SetPropertyAttribute(wxT("Width"), wxPG_ATTR_UNITS, wxT("Pixels") );
wxPG_ATTR_UNITS is what you're looking for.
Use the source, Luke!

Post Reply