Hybrid View

  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    1
    Vote Rating
    0
    frankandangel is on a distinguished road

      0  

    Lightbulb simple color picker

    simple color picker


    I have write a plugin to pick color after textfield.
    if you like it, use it free

    1st just put it before you use it.

    HTML Code:
       	Ext.form.colorPicker = Ext.extend(Ext.form.TextField,{
    		fieldLabel:"取色框",
    		value:"#000",
    		id:"colorPicker",
    		listeners:{
    			"focus":function(){
    				var w = new Ext.Window({
    					x:this.getPosition()[0]+120,
    					y:this.getPosition()[1],
    					title:"test",
    					items:[
    					{xtype:"colorpalette",id:"innerColorPicker",listeners:{"select":function(palette, selColor){Ext.getDom("colorPicker").value = "#"+selColor;w.hide();}}}
    							]
    				});
    				w.show();
    			}
    		}
    	});
    	
    	Ext.reg('colorPicker', Ext.form.colorPicker);

    Then use it :

    var panel=new Ext.form.FormPanel({
    frame:true,
    layout:'form',
    labelAlign:'right',
    renderTo:"testForm",
    width:400,
    items:[{
    xtype:"colorPicker",
    name:'color'
    }]
    });


    this plugin have been large used in http://www.51widget.com/

  2. #2
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default


    Probably you should post this in the ext part of the forum, instead of gxt...

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    2
    Vote Rating
    0
    aasshishpatil is on a distinguished road

      0  

    Default


    i m getting error ext.js is not function

Similar Threads

  1. [3.x] Color picker
    By arno974 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 5 Jul 2010, 8:06 AM
  2. How to add a Color picker in extjs3.0
    By chullan in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 1 Oct 2009, 7:58 AM
  3. How to use YUI Color Picker
    By hypeway in forum Ext 1.x: Help & Discussion
    Replies: 19
    Last Post: 24 May 2007, 2:27 PM
  4. Color Picker
    By Cipher in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 9 Apr 2007, 8:05 PM

Thread Participants: 2

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar