English 中文(简体)
带有sen感的图像场
原标题:Image field with sencha touch

我正在使用sen语制作一个表格。 实地调查。 在我的模型中,我有一个形象领域,我如何能够展示我模式的当前形象? 我的发言。 现场研究:

/**
 * This is used by the NestedList example to allow editing of an item in the Store
 */
Ext.define( ParkingSencha.view.EditorPanel , {
    extend:  Ext.form.Panel ,
    requires: [ Ext.form.FieldSet ],
    id:  editorPanel ,
    config: {
        modal: true,
        hideOnMaskTap: false,
        centered: true,
        width: 500,
        scrollable: false,
        items: [{
            xtype:  fieldset ,
            items: [
            {
                xtype:  textfield ,
                name:  keyword ,
                label:  Mots clés 
            },
            {
                xtype:  textfield ,
                name:  title ,
                label:  Titre 
            },
            {
                xtype:  textfield ,
                name:  image ,
                label:  image 
            }
            ]
          }]
        }]
    }
});
最佳回答

using/loadingimage in a formfield/code>, You need to use image part, not textfield

......

....
{
  xtype:  image ,
  src:  http://www.sencha.com/assets/images/sencha-avatar-64x64.png ,
  flex: 1
},
....
问题回答

There is another solution for this take a label and set a image inside html tag ....:) like this

{
xtype: label ,
html: <img src="path of image "> 
}

or the boomslang ans is more than correct i will recommend you to use that ..





相关问题
ExtJS load form items/fields from database

I am using ExtJS 3 here. I would like to populate a formpanel from database with fields to be submitted. Basically, I don t know witch fields my form will have and I want to generate all formpanel ...

How to use Ext JS for role based application

I am planning to use Ext JS for a large application. The application s features are role based. When user login, they only see menu and screen features related to them. My server side technology will ...

Dynamically adding a TabPanel to a Panel Region

I have a Panel layout with a TreePanel in one region. A user clicks on an node in the tree and a TabPanel should be displayed in another region with information, editing tools etc. for that tree node....

How to embed Json result within Extjs Panel?

I have some issues with Json result and embed it within the html of the Extjs Panel. Here s that I have managed to get so far. myPanel is embedded within a mainPanel, and I have some shows/hide of ...

Ajax data update. Extjs

I need to keep certain data ( in a grid) up to date and was gonna do a poll to the server every 15 seocnds or so to get the data and refresh the grid, however it feels a bit dirty ( the grid will have ...

Better way to call superclass method in ExtJS

All the ExtJS documentation and examples I have read suggest calling superclass methods like this: MyApp.MyPanel = Ext.extend(Ext.Panel, { initComponent: function() { // do something MyPanel ...

Merged Headers in Ext JS Grid

Is it possible to have two headers in Ext JS grids? I have to show my grid as grouped data.. for example product types and products. In my case I need a grid like this: Field | Product Type A ...