Hybrid View

  1. #1
    Ext User
    Join Date
    Apr 2007
    Posts
    22
    Vote Rating
    0
    mattn is on a distinguished road

      0  

    Default Textarea word wrapping

    Textarea word wrapping


    Hello,

    How can I enable word wrapping in a textarea

    thx for the help

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,496
    Vote Rating
    44
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

  3. #3
    Ext User
    Join Date
    Apr 2007
    Posts
    22
    Vote Rating
    0
    mattn is on a distinguished road

      0  

    Default


    Thx for the reply but this is for html, how can i do it for extjs?

    Code:
    		
    new Ext.form.TextArea({
                fieldLabel: 'Schrijven',
                name: 'schrijven',
                grow: true,
                preventScrollbars:true,
                value: ''
            })

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,496
    Vote Rating
    44
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Set the attribute.

  5. #5
    Ext User
    Join Date
    Apr 2007
    Posts
    22
    Vote Rating
    0
    mattn is on a distinguished road

      0  

    Default


    How can I set these attributes for the textarea above?
    I tried several things but didn't found it

    sorry for the noob questions & thx for the help

  6. #6
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    The TextArea control wraps by default. That's assuming that the the text contains a blank space to break on. If not, it won't wrap.

  7. #7
    Ext User
    Join Date
    Sep 2007
    Posts
    97
    Vote Rating
    0
    talshadar is on a distinguished road

      0  

    Exclamation not to resurrect a dead thread

    not to resurrect a dead thread


    but the textarea totally isn't working for me. It will not word wrap nor will it accept an ENTER as a new line - it's just one loooooong line of text.

    Code:
     tDescription = new Ext.form.TextField({
            fieldLabel:"Description"
            ,name:"Description"
            ,tabIndex:3
            ,width:250
            ,height:90
            ,allowBlank:false
            ,disableKeyFilter:true
    });
    That is what I have. I don't want the text area to grow - it needs to be the set size with scroll bars appearing as needed and the user needs to be able to actually use the enter key to add new lines. Any suggestions?

    This is the most frustrating thing I've found with ExtJS - the lack of REAL dupport documentation. php.org is the best example of documentation I've seen and the extJS docs don't even come close. It should NOT be so bloody difficult to get things to work and so much of the time I'm stuck to waiting for someone to help me with what is usually such a simple simple thing to do. It is so frustrating. The ExtJS community is awesome, don't get me wrong. There are so many people that are extremely helpful and a lot of good advice in the forums, it really does make a difference and is pretty much the only reason I keep using and trying to learn the tool. But I still maintain it's a LOT harder than it has to be. Concrete examples shouldn't be difficult to find but in alot of cases it's impossible to find an exact example.

    Sorry for the added rant but it's been frustrating me ever since I started using it and after spending the last 2 1/2 days banging my head on the stupidest littlest things I'm more than a little frustrated.

  8. #8
    Ext User
    Join Date
    Sep 2007
    Posts
    97
    Vote Rating
    0
    talshadar is on a distinguished road

      0  

    Exclamation hows this for wierd

    hows this for wierd


    As most of you probably know, if you hold the ALT key and using the number pad, type in the ascii code for characters - you get the character. IE: ALT - 255 == space. ALT 13 SHOULD be a enter/return but in the TextArea - it's returned as a pretty little musical note. ♪ <-- just like that. So that would explain why hitting enter isn't doing a thing.

    This is pretty important to get resolved so any help would be appreciated.

  9. #9
    Ext User
    Join Date
    Sep 2007
    Posts
    97
    Vote Rating
    0
    talshadar is on a distinguished road

      0  

    Thumbs up never mind

    never mind


    It's working now - have NO idea why:

    Code:
      tDescription = new Ext.form.TextArea({
      fieldLabel:"Description",
      name:"Description",
      tabIndex:4,
      width:250,
      height:90, 
      allowBlank:false, 
      disableKeyFilter:true 
    });

  10. #10
    Sencha User
    Join Date
    Dec 2012
    Posts
    3
    Vote Rating
    3
    peisenmann is on a distinguished road

      0  

    Default


    I came across this while Googling, so I guess it's still relevant enough. TextFields don't typically wrap, whereas TextAreas do. It looks like you figured that out at some point, talshadar, even if you didn't realize you figured it out.