1. #1
    Ext User
    Join Date
    Aug 2008
    Posts
    3
    Vote Rating
    0
    overgaard is on a distinguished road

      0  

    Default Change behaviour of enter and shift+enter in TextArea in EditorGridPanel

    Change behaviour of enter and shift+enter in TextArea in EditorGridPanel


    Hi all,

    I've been trying to find some way to change the way ENTER and SHIFT+ENTER behaves
    in a TextArea in a EditorGridPanel.
    To put it short. Normally the TextArea in a EditorGridPanel uses ENTER to add a new line in
    the textarea and SHIFT+ENTER ends the editor mode.
    How to reverse this?
    If I would like SHIFT+ENTER to do a new line and ENTER to end editor mode.
    Eg. work exactly the oppisite way.

    I have been trying with some event, overrides, etc without any luck.
    Is this easy or hard to do?

    Best regards // J

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Try defining you column editor as:
    Code:
    editor: new fm.TextArea({
    	fireKey : function(e){
    		if(e.isSpecialKey() && (this.enterIsSpecial || (e.getKey() != e.ENTER || !e.hasModifier()))){
    			this.fireEvent("specialkey", this, e);
    		}
    	}
    })

  3. #3
    Ext User
    Join Date
    Aug 2008
    Posts
    3
    Vote Rating
    0
    overgaard is on a distinguished road

      0  

    Default


    Thanks! Great!
    It works as far as making ENTER leave editmode and not to a newline in the textarea.
    But how to get SHIFT+ENTER to do what ENTER used to do: a newline in the textarea?
    Any ideas?

    Regards // J

Thread Participants: 1

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