1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    54
    Answers
    4
    Vote Rating
    2
    cswsteve is on a distinguished road

      0  

    Default Answered: Is there a way to add another button to a Combo Box?

    Answered: Is there a way to add another button to a Combo Box?


    I am looking for a way to add a second button to the combo box component. This would be a second button next to the existing button that drops down a list. I plan to use this to open the supporting view for the combo box data.

    Take for example a Terms combo box. You have the combo box button that drops down a list of available terms but then I want to add a mini edit/add button so the user can click the button to open the Terms view where they can add more terms or edit an exiting term.

    Thanks

  2. I was able to figure this out in Architect based on your reply. I didn't realize that you could add custom Configs to components in Architect. So based on your reply I tried adding trigger2Cls by entering it in the Config search box and clicking the Add button. You could add a 3rd button by adding trigger3Cls and so on.


    Then I added x-form-clear-trigger (or create your own css class) to the Config and it magically added a second button to the Trigger component in Architect. Here are some screen shots if anyone else needs to do this in Architect.

    Attachment 41112

    Here it is shown in the Architect design window.
    Attachment 41113


    Thanks!

  3. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,800
    Answers
    359
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    See if the comments under the following property help at all:
    http://docs.sencha.com/ext-js/4-1/#!...cfg-triggerCls

  4. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    54
    Answers
    4
    Vote Rating
    2
    cswsteve is on a distinguished road

      0  

    Default


    I am not sure I follow how that works. Are you saying I need to change from using a combo box to a trigger field? Do you have any examples in Architect that shows how this would work?

    Thanks

  5. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,800
    Answers
    359
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Combobox is extended from triggerfield, so it has the same functionality. Sorry about the confusion there. Should have linked to the combox API docs directly.

    Sorry, not sure how to guide you on Architect. My experience is that Architect does MOST of what you'd wnat to do, but not everything from the API.

    For example, last I looked it didn't support
    http://docs.sencha.com/ext-js/4-1/#!...fg-placeholder

    So, you build most of what you want in Architect and then fine-tune in code after exporting it I believe, but I've not done much with Architect except just audition it.

  6. #5
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    54
    Answers
    4
    Vote Rating
    2
    cswsteve is on a distinguished road

      0  

    Default


    I was able to figure this out in Architect based on your reply. I didn't realize that you could add custom Configs to components in Architect. So based on your reply I tried adding trigger2Cls by entering it in the Config search box and clicking the Add button. You could add a 3rd button by adding trigger3Cls and so on.


    Then I added x-form-clear-trigger (or create your own css class) to the Config and it magically added a second button to the Trigger component in Architect. Here are some screen shots if anyone else needs to do this in Architect.

    Steve Palm.2013.01.05_17.47.26.PM.png

    Here it is shown in the Architect design window.
    Steve Palm.2013.01.05_17.47.49.PM.png


    Thanks!

Thread Participants: 1