Results 1 to 4 of 4

Thread: Image Picker Combo Box

  1. #1
    Sencha User
    Join Date
    Sep 2010
    Location
    Ft Myers, Fl
    Posts
    67

    Default Image Picker Combo Box

    I'm trying to build an image picker combobox, that displays the images while you choose them.
    Code:
    initComponent: function() {
            Ext.ux.form.ImagePicker.superclass.initComponent.call(this);
      this.tpl = this.tpl ||
            '<tpl for="."><div class="x-combo-list-item ext-color-{' + this.valueField +
            '}"><div class="ext-cal-picker-icon">&nbsp;</div>{' + this.displayField + '}</div></tpl>';
        },
    This is from the example calendar that has a combobox where you choose a marker i.e. school, work, etc. and it also pulls a small colored circle image with it. I want to be able to just call the image.

    Code:
    this.tpl = this.tpl ||
            '<tpl for="."><div class="x-combo-list-item"><img src=" this.valueField"><div class="ext-cal-picker-icon">&nbsp;</div>{' + this.displayField + '}</div></tpl>';
        },
    This is the starting point that I was given to work off of, any help is appreciated.
    Danger Zone!

  2. #2
    Sencha User
    Join Date
    Sep 2010
    Location
    Ft Myers, Fl
    Posts
    67

    Default

    It should && for both of them not ||, so I updated the bottom piece of code to reflect how it should actually be. Oops!
    Code:
    this.tpl = this.tpl &&
            '<tpl for="."><div class="x-combo-list-item"><img src=" this.valueField"><div class="ext-cal-picker-icon">&nbsp;</div>{' + this.displayField + '}</div></tpl>';
        },
    Danger Zone!

  3. #3
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    I'm sure there's a question in here somewhere, but what is it?

  4. #4
    Sencha User
    Join Date
    Sep 2010
    Location
    Ft Myers, Fl
    Posts
    67

    Default

    sorry I was kind of unsure what to ask, but I was taken off of working on this anyways
    Danger Zone!

Similar Threads

  1. Combo Box/Picker control?
    By Bucs in forum Sencha Touch 1.x: Discussion
    Replies: 6
    Last Post: 6 May 2011, 3:08 AM
  2. Replies: 5
    Last Post: 6 Mar 2011, 10:51 PM
  3. Combo box image is getting misaligned
    By nanich in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 4 May 2009, 4:31 AM
  4. Date Picker Image URL Absolute
    By kelly stevens in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 11 Sep 2007, 12:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •