1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    5
    Answers
    1
    Vote Rating
    0
    hshu is on a distinguished road

      0  

    Default Unanswered: Textarea and triggerField in Ext 4.1?

    Unanswered: Textarea and triggerField in Ext 4.1?


    Hello guys,
    I want to make a textarea with a triggerField. But since triggerField extends from textfield, it is not easy to do. In Ext 2, there was a "defaultAutoCreate" config I could override and change the textfield into a textarea.

    But how to do this in Ext 4.1? The only way I see is to create my custom triggerField class so that it extends from textarea.

    Also, instead of extending from textarea, another alternative would be to somehow make a textfield display multiple lines, but I can't figure that out. ('\n' and '<br/>' won't work)

    Thoughts? Thanks in advance!

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,636
    Answers
    613
    Vote Rating
    400
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    What would happen after the trigger .. update the current line? You could always create a container with a button in a hbox layout ...

    Also .. Both triggerfield and textarea extend from textfield. You could create your own widget.

    Scott.

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    5
    Answers
    1
    Vote Rating
    0
    hshu is on a distinguished road

      0  

    Default


    Hi Scott,
    Thank you for your reply!
    The trigger will open up something like a to-do list (one thing each line).
    I don't want all my to-do things to be in a single line, that's why I need a textarea.

    Currently, my solution is to create my custom triggerTextArea class. It copies all the source code of Ext.form.trigger. The only difference is that it extends from Ext.form.TextArea.
    So this solution is not a good way of code reusing (too much duplicate code.)
    Is there a better way?

    Also can you elaborate on "a container with a button in a hbox layout" ?

Thread Participants: 1

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