Jump to content

SelectAll in Prompt Command


Osama Ghazal

Recommended Posts

5 hours ago, Sherzod said:

Hello,

 

Thank you Sherzod,

but this is a part of solution, and it is good, but this put the cursor in the end of the sentence, I need to select all the sentence and focus also.

so, this solve the focus but didn't solve the selection of the sentence.

and should i learn CSS, JavaScript and Sencha Ext to work on UniGUI .

Really, I know UniGUI is a great component, but I face some difficulty like these problems.

I am trying to accomplished around 30% from my new project before buying this component to see if it fully help me to do my project or not.

 

Thank you for your co-operate

Link to comment
Share on other sites

4 hours ago, Osama Ghazal said:

but this is a part of solution, and it is good, but this put the cursor in the end of the sentence, I need to select all the sentence and focus also.

so, this solve the focus but didn't solve the selection of the sentence.

Ext.onReady(function() {
    Ext.Msg.on('show', function() {
        Ext.defer(function() {
            var inputEl = Ext.WindowManager.getActive().getEl().select('input').elements[0];
            var textareaEl = Ext.WindowManager.getActive().getEl().select('textarea').elements[0];
            if (inputEl) {
                inputEl.focus();
                inputEl.select();
            }
            if (textareaEl) {
                textareaEl.focus();
                textareaEl.select();
            }
        }, 100);
    });
});

 

Link to comment
Share on other sites

10 hours ago, Sherzod said:
Ext.onReady(function() {
    Ext.Msg.on('show', function() {
        Ext.defer(function() {
            var inputEl = Ext.WindowManager.getActive().getEl().select('input').elements[0];
            var textareaEl = Ext.WindowManager.getActive().getEl().select('textarea').elements[0];
            if (inputEl) {
                inputEl.focus();
                inputEl.select();
            }
            if (textareaEl) {
                textareaEl.focus();
                textareaEl.select();
            }
        }, 100);
    });
});

 

Thank you Sherzod for your cooperate,

It works excellent

Best Regards

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...