Results 1 to 8 of 8

Thread: How to open a floating container or textfield at the position of it button.

  1. #1
    Sencha User
    Join Date
    Jun 2016
    Posts
    6
    Vote Rating
    0
      0  

    Default How to open a floating container or textfield at the position of it button.

    Hello,

    I have a floating textbox which opens when I click a button, The problem is that the floating textbox is opening on the top left-hand side. I want to position it to the button am clicking to open it.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,307
    Vote Rating
    1477
      0  

    Default

    Got code? What framework are you using? What version? If Ext JS 6.x, what toolkit?

    First thing that would help is posting in the appropriate forum not the general "Community Discussion" forum.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jun 2016
    Posts
    6
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Got code? What framework are you using? What version? If Ext JS 6.x, what toolkit?


    First thing that would help is posting in the appropriate forum not the general "Community Discussion" forum.

    I was a bit confused about where to post it so thats why i posted it in the community discussion, Could you tell me where should I post this kind of issues,


    And is there any way to change it now or i need to post a new issue again




    Code:
    // this is the button which users will be clicking and the floating textfield will pop at it position.
    var srchIcon = { 
                xtype: 'button',
                //hidden:true,
                //itemId: 'btn_collapse',
                ui: 'IconButton',
                cls: 'panelheaderarrow',
                //hidden:true,
                text: '<i class="mdi mdi-18px mdi-magnify"></i>',
                listeners:{
                    click: function (btn){
    
    
                        var rt = btn.up().down('#gridSearch');
                        
                        if(rt.hidden == true){
                            rt.show();
                        }else{
                            rt.hide()
                        };
    
    
                    }
                    }
                }
    
             // This is the floating text field which will pop up
            var searchtextfield = {
                itemId: 'gridSearch',
                xtype: 'textfield',
                hidden:true,
                floating:true,
                focusCls:'focusgrow',
                //draggable: true,
                //margin: '0 0 2 0',
                cls:me.searchCls,
                style:'transition: width 2s;float:right;',
                width:24,
                emptyText: me.searchEmptyText,
                margin:me.searchMargin,
                triggers: {
                    clear: {
                        cls: 'x-form-clear-trigger',
                        hidden: true,
                        handler: me.onClearClick
                    },
                    search: {
                        cls: 'x-form-search-trigger',
                        handler: me.onSearchClick
                    }
                },
                listeners: {
                    focus: function (){
                        debugger;
                        this.setWidth(200);
                    },
                    blur: function (){
                        debugger;
                        this.setWidth(30);
                    },
                    change: {
                        fn: me.onSearchChange,
                        scope: me
                    }
                }
            }



    Above is the code from the HeaderSearch plugin I am using and doing the changes in and I have attached the HeaderSearch plugin file and even the grid ux I created and where I will be using the plugin,
    Attached Files Attached Files

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,307
    Vote Rating
    1477
      0  

    Default

    So I see your code is for Ext JS... what version? There are help and Q&A forums for different versions of Ext JS:

    6.x
    5.x
    4.x
    3.x
    2.x
    1.x

    No way to change it now (unless an moderator moves it but I don't see Idera/Sencha patrolling the forum anymore), just for the future. Also for Ext JS 6, need to say what toolkit (classic or modern) so that people can better help you as the answer may very well be different based that answer.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  5. #5
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,307
    Vote Rating
    1477
      0  

    Default

    Oh also... getting the code runnable on Sencha Fiddle will help you get help much faster normally.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  6. #6
    Sencha User
    Join Date
    Jun 2016
    Posts
    6
    Vote Rating
    0
      -1  

    Default

    Hello,

    I am using extjs 6.2.1.
    I was unable to create a demo in sencha fiddle. Anyways I got it to work with a UX called callout.js

    and Thank you for your help

  7. #7
    Ext JS Premium Member
    Join Date
    Sep 2009
    Location
    Cypress, Kalifornia
    Posts
    284
    Vote Rating
    129
      1  

    Default

    I wish I could delete these posts. This is a community discussion forum not a release specific debug thing.

  8. #8
    Sencha Premium User suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    731
    Vote Rating
    246
      0  

Similar Threads

  1. Replies: 1
    Last Post: 3 Nov 2016, 12:32 PM
  2. Replies: 4
    Last Post: 26 Mar 2015, 7:35 AM
  3. Replies: 1
    Last Post: 16 Jan 2013, 9:06 AM
  4. Replies: 1
    Last Post: 2 Feb 2011, 7:42 PM
  5. Replies: 1
    Last Post: 18 Oct 2010, 1:09 PM

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
  •