1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    42
    Answers
    1
    Vote Rating
    0
    elnaz is on a distinguished road

      0  

    Default Answered: how can i put picture for information between text and textfield

    Answered: how can i put picture for information between text and textfield


    Hi,

    Is any one knows ,How can I put any picture between text and textfiled.

    like this question mark picture icon ,for getting information about text field


    questions.jpg

  2. That's just overnesting...

    Just need to insert the image tag into the label. You may want to check out Ext.form.Labelable and the labelableRenderTpl property

  3. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    Here are a couple of ways to do it, I'm sure there are more.

    Code:
    new Ext.form.field.Text({
        fieldLabel: 'Hello<img src="pic.png" />',
        labelSeparator: ''
    }),
    Code:
    var textField = new Ext.form.field.Text();
    
    new Ext.container.Container({
        items: [
            {
                forId: textField.getInputId(),
                text: 'Hello',
                xtype: 'label'
            }, {
                src: 'pic.png',
                xtype: 'image'
            },
            textField
        ],
        layout: {
            align: 'middle',
            type: 'hbox'
        }
    });
    It's then just a case of tidying up the widths, paddings, margins, etc. to get it all looking the way you want.

    The first option may appear simpler but personally I think I prefer the second option.

  4. #3
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,770
    Answers
    355
    Vote Rating
    165
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    I like that second option, too. The image component lets you easily set event handlers, set the src, etc. You might wrap them in a fieldcontainer instead of just a container since fieldcontainer is labelable.
    http://docs.sencha.com/ext-js/4-0/#/api/Ext.form.FieldContainer

  5. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3357
    Vote Rating
    751
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    That's just overnesting...

    Just need to insert the image tag into the label. You may want to check out Ext.form.Labelable and the labelableRenderTpl property
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #5
    Sencha User
    Join Date
    Jul 2011
    Posts
    42
    Answers
    1
    Vote Rating
    0
    elnaz is on a distinguished road

      0  

    Default


    Thanks Guys

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