Osama Ghazal Posted September 12, 2021 Share Posted September 12, 2021 Hi All, how can I make the text in the Prompt command is selected when the prompt is open? Prompt('Enter Name',' I need this text to be selected all and focused ',msConfirmation,callpackproc,false); Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 12, 2021 Share Posted September 12, 2021 1 hour ago, Osama Ghazal said: how can I make the text in the Prompt command is selected when the prompt is open? Hello, Quote Link to comment Share on other sites More sharing options...
Osama Ghazal Posted September 12, 2021 Author Share Posted September 12, 2021 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 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 13, 2021 Share Posted September 13, 2021 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); }); }); Quote Link to comment Share on other sites More sharing options...
Osama Ghazal Posted September 13, 2021 Author Share Posted September 13, 2021 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.