wxMax: property grid problems.

BlitzMax Forums/Brucey's Modules/wxMax: property grid problems.

Wiebo(Posted 2009) [#1]
I'm having problems integrating a property grid into my form. I use splitters and maybe thats the problem. Has someone experience with splitters and property grids? I really want to use this great widget.

here is the form project file:


here is my code:


I marked my own added code with: added manually. Note that you have to add the wxAdditions to wxformbuilder manually as well.

The CodeGen utility doesn't convert the propertygrid code (oh nooooooo), so i added that in manually. The grid should appear on the right side of the form, as seen in the form in wxformbuilder, instead it gets drawn over the treeview on the left side of the form. How to fix this?


Brucey(Posted 2009) [#2]
The CodeGen utility doesn't convert the propertygrid code (oh nooooooo)

Neither it does... I'll try to sort that out soon.

You are adding the property grid to the wxFrame, instead of the panel :-)
You should do this instead:
Local pg:wxPropertyGrid = New wxPropertyGrid.Create(m_panel_propgrid,wxID_ANY, -1,-1,200,-1,wxTR_DEFAULT_STYLE)


btw, you know that you don't have to edit the generated code?
It's designed so that you can keep that in a separate file, and import it - therefore not having to worry about losing your own work when you generate.


Wiebo(Posted 2009) [#3]
oh dear, too much code time yesterday I think. Thanks for the reply Brucey...

Yes, I know I don't have to edit the exported code, but I'm just testing and getting a feel of things. And, I had to exit it cos the propertygrid widget is not exported :)


Wiebo(Posted 2009) [#4]
Hi Brucey,

Am I right when I say that SetPropertyValueFloat(ByName) is not implemented in wxPropGrid ?? I'm storing my floats as strings now and cast them, but its kinda kludgy.


Brucey(Posted 2009) [#5]
Probably... :-)

Since the API for the property grid is so big, I've been implementing functionality as I required it - or as it was requested. I will look at implementing some more.


Wiebo(Posted 2009) [#6]
OK, it would be cool if you can add it! For now, the string to float cast is doing fine. But yeah, its a monster of a mod, I agree ;)