Results 1 to 2 of 2

Thread: Colspan Problem of Textfield

  1. #1
    Sencha User
    Join Date
    Nov 2015
    Posts
    6

    Default Colspan Problem of Textfield

    Hi, I'm new to ext Js & I wanted to build a simple calculator using it. but I got stuck in the middle of the design. I desired to took 4 columns in which a textfield will be there with spanning all over 4 columns. then buttons for digits will be there each column containing 4 buttons including the operators one also. Below is my code portion where I'm having difficulties of spanning the textfield over 4 columns. It seems that the code "colspan:4" has no effect.
    Code:
        Ext.define('CalcApp.view.main.Main', {                             extend:'Ext.panel.Panel',                                               width:'400px',                  height:'600px', buttonAlign:'center', bodyStyle:{ backgroundColor:'#ffc', margin:'40px' },  renderTo:Ext.getBody(), layout:{ type:'table',  anchor:'-25 -25',   columns:4, },                  controller: 'main',  viewModel: 'main',  items: [ { frame:true,  frameHeader:true,  title:'Calculator',  colspan:4 },                  {  xtype:'textfield',  colspan:4,  inputWidth:'390px',   id:'res_txt', fieldStyle:'height: 60px; font-size: 25pt; font-weight: bold; color: #777;',  emptyText:'result',  //maxlength:9, readOnly:'true',  }, {  xtype:'button',   text:'C',  id:'Bc',   type:'button',  tabIndex:11,  //scale:'small', anchor:'100%', border:'8 5 3 5', margin:'5', style: { width: '80px', marginBottom: '10px',  backgroundColor:'#2b5', borderColor:'#777'  },  handler:function(button){ //some handler code  }  },{  xtype:'button',  text:'0',  id:'B0',  itemId:'myCalc', reference:'B0',  type:'submit',  tabIndex:1, //scale:'small',   anchor:'100%', //anchoring the child elements. width=100% of the container & height=auto                     border:'8 5 3 5', margin:'5',  style: {  width: '80px',  marginBottom: '10px',  borderColor:'#777'  },  handler:function(){ //handler codes   },  listeners:[{    click:'catchValue'                                              }]                                  }]  });

  2. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Hi--

    Can you repost your code and wrap it in code tags? Even better, if you could create a Fiddle (https://fiddle.sencha.com) that will help others better assist in answering your questions.

    Thanks!
    Joel

Similar Threads

  1. [FIXED] grid RowExpander without enableLocking : colspan problem
    By pbaccari in forum Ext:Bugs
    Replies: 3
    Last Post: 24 Jun 2013, 11:36 PM
  2. TableLayout colspan problem
    By luca.santaniello in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 9 Feb 2011, 5:18 AM
  3. TableLayout problem with rowspan and colspan
    By faceyah in forum Ext 3.x: Bugs
    Replies: 0
    Last Post: 9 Dec 2010, 7:07 AM
  4. TableLayout problem with rowspan and colspan
    By faceyah in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 6 Dec 2010, 3:53 AM
  5. Replies: 14
    Last Post: 6 Feb 2009, 11:58 AM

Tags for this Thread

Posting Permissions

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