-
10 Oct 2012 10:45 PM #1
Unanswered: Inline textfield
Unanswered: Inline textfield
Hi,
Is it possible to have an inline textfield / selectfield?
I need it in my app to allow a user to complete a sentence.
E.g: ..... is the planet closest to the sun.
Can this be achieved in Sencha touch?
-
11 Oct 2012 12:57 AM #2
Code:{ label: 'label', xtype: 'textfield', listeners:{ initialize: function(c){ var el=Ext.DomHelper.append(c.element, { tag:'p', html:'is the planet closest to the sun', cls:'centeredCls' }, true ); el.setStyle({ 'line-height':'2.5em' }); } } }I write English by translator.
-
11 Oct 2012 1:48 AM #3
This is not exactly what I want...
Your code inserts text after the inputfield, but I need an inline textfield component. I need to be able to have multiple inline textfields on one line where the textfield is not the full width of the screen.
Here is a screenshot of what I want (language in the image is Dutch):Screenshot_2012-10-11-11-45-12.png
-
11 Oct 2012 2:12 AM #4
Code:Ext.create('Ext.Panel', { fullscreen:true, html:'<div>aaaaaaaaaa<div id="div1" style="display:inline-block"></div>bbbbbb</div>', listeners:{ painted:function(){ Ext.create('Ext.field.Text',{ width:50, renderTo:Ext.fly('div1') }) } } })I write English by translator.


Reply With Quote