Ecere SDK/eC Forums http://ec-lang.org/community/ Print view |
|
Custom data row drawing: e.g. adding icons to a drop box http://ec-lang.org/community/viewtopic.php?f=5&t=62 |
Page 1 of 1 |
Author: | jerome [ Tue Mar 30, 2010 9:38 pm ] |
Post subject: | Custom data row drawing: e.g. adding icons to a drop box |
Hey guys, Here is some sample code showing how to define a custom data type for use in data controls. It overrides the data type's OnDisplay() and OnGetString() methods to show the little flags next to each country. I had to do a little patch for the DataBox to pass along the 'fieldData' (used to store the flag collection), so I included a new ecere.dll in there. A future release of Ecere should contain this fix. Bug me if you want to run this on Linux. Grabbed the flags from http://www.famfamfam.com/lab/icons/flags/, thanks to thexa4 for pointing us there, and thanks to naji for asking about this Here is a stripped down version of the code: Code: Select all
Jerome |
Author: | redj [ Thu Apr 08, 2010 8:59 pm ] |
Post subject: | Re: Custom data row drawing: e.g. adding icons to a drop box |
very nice |
All times are UTC-05:00 | Page 1 of 1 |
Powered by phpBB® Forum Software © phpBB Limited |