How to: Get a font from a wxPropertyGrid

BlitzMax Forums/Brucey's Modules/How to: Get a font from a wxPropertyGrid

DavidDC(Posted 2009) [#1]
This took me about an hour to figure out and there's precious little on Google re this, so I thought I'd save others the joy of rediscovery.

Q: So you've added a font to a property grid via:

Append(New wxFontProperty.Create(_s_label:String, wxPG_LABEL, _font:wxFont))

How do you get it back out again?

A: Here's the relevant bits of my wxPropertyGrid wrapper that you will need if you want to retrieve your wxFont

(There is an internal function wxFontFromVariant but we don't seem to have access to it)


Use: GetAsFont("the label you used when adding the font to the grid")


theHand(Posted 2009) [#2]
Scarce information is always welcome. Thank you!