1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    0
    djhanwar is on a distinguished road

      0  

    Default Unanswered: 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
    38,583
    Vote Rating
    1136
    Answers
    3709
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      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 @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    0
    djhanwar is on a distinguished road

      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
    38,583
    Vote Rating
    1136
    Answers
    3709
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    Should work. Have you tried it?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    0
    djhanwar is on a distinguished road

      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
    manoveg is on a distinguished road

      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
    swathi001 is on a distinguished road

      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
    manoveg is on a distinguished road

      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;
    }