Adding Custom Widgets to wxGlade
wxGlade has the ability to integrate custom or 3rd party widgets into its pallette. This feature is not documented very well. By using some sample code from Alberto Griggio and digging through the core-widgets source code, I was able to create bridge code that adds Andrea Gavana’s FloatSpin control to the pallette. For those that follow, I suggest starting with the a similar class from the core pallette and the code for html_window. The only real gotcha for this integration was that the widget container was not seeing KILL FOCUS events from the FloatSpin controls and therefore changed data was not saved. This was fixed by trapping EV_FLOATSPIN events and calling the update.
The FloatSpin bridge code is installed by untarring from within your .wxglade directory. The included README contains more details.
Edits:
11/16/2006 – uploaded version 1.1. Adds event handlers and support for digits=0.







January 22nd, 2009 at 9:35 am
Hello Kevin,
Well done,really good work!
Is there any tutorial where is explain how to write a costumer widget for the wxGalde?
Is there a place where I can upload my own wxGlade-widget or get other widget for the wxGlade?
Thanks allot
Max P
January 22nd, 2009 at 5:59 pm
Thanks Max. I’m not aware of anything specific, I figured it out by stepping through the code and copying others. Best I can offer is to start here: http://wxglade.sourceforge.net/tutorial.php and maybe add your code or a link to it. If that doesn’t work I would post it here for you, but I think the sourceforge site would be the first chouse.