wxPropertyGrid not displaying correctly

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
qgranfor
Experienced Solver
Experienced Solver
Posts: 89
Joined: Sun Aug 29, 2004 7:32 pm
Location: ND...USA
Contact:

wxPropertyGrid not displaying correctly

Post by qgranfor » Sat Aug 20, 2005 9:54 pm

I'm trying to implement wxPropertryGrid control into my win32 application and am having trouble with the data within the control not showing up properly. I'm using wx2.6.1, gcc, windows xp and wxPropertyGrid 1.0.5 for my code.

Code as follows:

pg = new wxPropertyGrid( this, -1, wxPoint(10,10),
wxSize(230,500), wxPG_SPLITTER_AUTO_CENTER | wxPG_DEFAULT_STYLE
);
pg->Append( wxPropertyCategory(wxT("Main")) );
pg->Append( wxStringProperty(wxT("Name")) );
pg->Append ( wxIntProperty ( wxT("IntProperty"), wxPG_LABEL, 12345678 ) );
pg->Append ( wxFloatProperty ( wxT("FloatProperty"), wxPG_LABEL, 12345.678 ) );

The numerical data is in the control if I click on it, it'll refresh a bit to show the values. However, the label, categories and such simply never show up. Upon first display of the frame, the control will have whatever graphics that would be in the control if it was a hole in the frame (ie, anything behind that control such as other frames, desktop wallpaper, etc).

I've tried refresh commands and looking over the example code I don't think I'm missing anything.

:?

ssigala
Earned some good credits
Earned some good credits
Posts: 109
Joined: Fri Sep 03, 2004 9:30 am
Location: Brescia, Italy

Post by ssigala » Sun Aug 21, 2005 9:01 pm

I don't see nothing wrong in your code. Maybe the problem is created by some wrong usage of sizers in the parent widget?
Sandro Sigala - Kynosoft, Brescia

qgranfor
Experienced Solver
Experienced Solver
Posts: 89
Joined: Sun Aug 29, 2004 7:32 pm
Location: ND...USA
Contact:

Post by qgranfor » Sun Aug 21, 2005 11:49 pm

There aren't any sizers on my frame, but just for kicks on your suggestion I added one to see if it changed at all. Seems to have no effect.

I've installed different video drivers and tried on my Laptop too but it acts the same on all the platforms so I must simply be doing sumthing weird with my code. Course, one is XP Home and other is XP Pro.......I'll have to try on different platform and see if it's an XP issue? Changing the themes didn't helper either.

I just remembered that wxradiobuttonbox does the same thing for buttons that are hidden.

Just spent the last few hours builing a win98se box to test on......same thing, so it's not an XP issue. Joy. :roll:

Post Reply