Results 1 to 8 of 8

Thread: how to remove Done button in Select field in snecha touch

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default how to remove Done button in Select field in snecha touch

    I want to remove the done button from selectfield .When i select and oprion from select field then it should dispaly in select field. Please provide me any solution

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    You would need to override the getPicker method on the Select field and add add the config doneButton : false to the Ext.Picker
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default Attachin code please let me know it ti correct

    HI ,

    I am attaching my code . please let me it is correct way to remove that done button. i want when i click on any display value in select field that should dispaly in select field

    Code:
    {
         xtype : 'selectfield',
         name : 'selectcompany',
         placeHolder : 'Select Company',
         width : '95%',
         id : 'selectcompany',
         value:'',
         valueField : 'idcompany',
         displayField : 'companyname',
         store:companyStoreName,
         getPicker: function() {
           if (!this.picker) {
            this.picker = new Ext.Picker({
             slots: [{
              align       : 'center',
              name        : this.name,
              valueField  : this.valueField,
              displayField: this.displayField,
              value       : this.getValue(),
              store       : this.store
             }],
             listeners: {
              change: this.onPickerChange,
              scope: this
             },
             doneButton: false;
            });
           }
           return this.picker;
          }
         
        }
    Last edited by mitchellsimoens; 10 Feb 2012 at 4:04 AM. Reason: added [CODE] tags

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Should work. Have you tried it?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default Button removed but how the value will select

    Button has removed but values are not selected how it will work
    Using follwoing code
    {
    xtype : 'selectfield',
    name : 'selectcompany',
    placeHolder : 'Select Company',
    width : '95%',
    id : 'selectcompany',
    value:'',
    valueField : 'idcompany',
    displayField : 'companyname',
    store:companyStoreName,
    getPicker: function() {
    if (!this.picker) {
    this.picker = new Ext.Picker({
    slots: [{
    align : 'center',
    name : this.name,
    valueField : this.valueField,
    displayField: this.displayField,
    value : this.getValue(),
    store : this.store
    }],
    listeners: {
    change: this.onPickerChange,
    scope: this
    },
    doneButton: false,
    cancelButton:false

    });
    }
    return this.picker;
    },
    onPickerChange : function(picker, value) {
    alert(value)
    this.setValue(value);
    this.fireEvent('change', this, this.getValue());

    }


    },

  6. #6
    Sencha User
    Join Date
    Jul 2012
    Posts
    35
    Vote Rating
    0
      0  

    Default same problem

    Hi,

    I am facing the same problem.
    Can you please share how you solved it.

  7. #7
    Sencha User
    Join Date
    May 2012
    Posts
    8
    Vote Rating
    0
      0  

    Default How to change color of Done and Cancel button of select Field

    // Hi i am using sencha touch 2.0 framework . I used select field in my project the thing is that i need to change the color of done and cancel button of the select field. But those picker buttons are not visible in browser but appearing in device. So how can i apply color to those two buttons.

  8. #8
    Sencha User
    Join Date
    Jul 2012
    Posts
    35
    Vote Rating
    0
      0  

    Default

    I did by giving config options to done and select button just like normal button and gave css property to it.

    Code:
    doneButton:{
                            text:'Fertig',
                            cls: 'pickerdonebutton'
                        },
    and in css file

    Code:
    .pickerdonebutton
    {
      background:#125f9b !important;
      color:#ffffff !important;
    }

Posting Permissions

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