bbm Posted July 31, 2018 Share Posted July 31, 2018 Hi, when I open a new frame to enter new data, I want to set the focus on a special uniEdit component. How can I do that? The UniEdit.SetFocus does not work. Best regards 1 Link to comment Share on other sites More sharing options...
belo Posted July 31, 2018 Share Posted July 31, 2018 procedure TUniFrame1.UniFrameCreate(Sender: TObject); begin UniEdit1.SetFocus; end; Link to comment Share on other sites More sharing options...
bbm Posted July 31, 2018 Author Share Posted July 31, 2018 Hi, thank you, but this is not working. The UniEdit is part of a UniFieldSet. Could this be the problem? Best regards Link to comment Share on other sites More sharing options...
Sherzod Posted July 31, 2018 Share Posted July 31, 2018 Hi, Is the text field read-only? Link to comment Share on other sites More sharing options...
bbm Posted July 31, 2018 Author Share Posted July 31, 2018 Hi, no. Currently I made a work arround. I create an ajax event in the afterrender ExtEvent. Then I can use the UniEdit.SetFocus in the OnAjaxEvent. Thank you all. Best regards Link to comment Share on other sites More sharing options...
shawdown Posted July 31, 2018 Share Posted July 31, 2018 Na versão mais recente do unigui, o comando SetFocus funciona no onCreate. onCreate of the form. Link to comment Share on other sites More sharing options...
SayeyeZohor Posted March 6, 2019 Share Posted March 6, 2019 hi how focus of unicheckbox to uniedit? Link to comment Share on other sites More sharing options...
SayeyeZohor Posted March 6, 2019 Share Posted March 6, 2019 hi how focus of unicheckbox to uniedit? Link to comment Share on other sites More sharing options...
rtalmeida Posted March 6, 2019 Share Posted March 6, 2019 When I needed it, I was told to do so: UniFormAfterShow UniSession.AddJS('setTimeout(function(){'+UniEdit2.JSName +'.focus()}, 100)'); 1 Link to comment Share on other sites More sharing options...
Pep Posted March 7, 2019 Share Posted March 7, 2019 9 hours ago, rtalmeida said: When I needed it, I was told to do so: UniFormAfterShow UniSession.AddJS('setTimeout(function(){'+UniEdit2.JSName +'.focus()}, 100)'); rtalmeida, thanks a lot for this tip. For Frames I tested UniFrameReady an also works! Link to comment Share on other sites More sharing options...
M.Ammar Posted March 7, 2019 Share Posted March 7, 2019 hi i use this, procedure TfraEntr.UniFrameReady(Sender: TObject); begin UniDBEdit.JSInterface.JSCall('focus', []); end; regards Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now