thzero
11-22-2007, 02:00 PM
Here is a country field combobox that displays a small flag icon next to the right of the combobox.
To install, just unzip to the your ext script folder and see the examples\form\country.html for an example. To use the contol, just include the following two javascripts:
ux\widgets\form\CountryField.js
ux\widgets\form\CountryFieldStore.js
and the following style sheet:
resources\css\ext-ux-countryfield.css
A quick example of creating a CountryField is as follows:
new Ext.ux.CountryField({
fieldLabel: 'Country',
name: 'country',
maxHeight: 200,
typeAhead: true
});
By default the control uses the local store defined in the CountyFieldStore.js, if you want to use your own custom store (local or remote) just define, as normal, a 'store' property and a 'mode' property, etc.
The download is available from http://www.thzero.com/programming/extjs/CountryField.zip as it is too big [240kb] too attach (due to the country images included).
To install, just unzip to the your ext script folder and see the examples\form\country.html for an example. To use the contol, just include the following two javascripts:
ux\widgets\form\CountryField.js
ux\widgets\form\CountryFieldStore.js
and the following style sheet:
resources\css\ext-ux-countryfield.css
A quick example of creating a CountryField is as follows:
new Ext.ux.CountryField({
fieldLabel: 'Country',
name: 'country',
maxHeight: 200,
typeAhead: true
});
By default the control uses the local store defined in the CountyFieldStore.js, if you want to use your own custom store (local or remote) just define, as normal, a 'store' property and a 'mode' property, etc.
The download is available from http://www.thzero.com/programming/extjs/CountryField.zip as it is too big [240kb] too attach (due to the country images included).