mikromundo Posted August 30, 2019 Share Posted August 30, 2019 How can I get data-ref attribute dinamically from a component ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 30, 2019 Share Posted August 30, 2019 7 hours ago, mikromundo said: How can I get data-ref attribute dinamically from a component ? Hi, Sorry, for what purpose do you want to use it? Can you please explain in more detail? Quote Link to comment Share on other sites More sharing options...
mikromundo Posted August 31, 2019 Author Share Posted August 31, 2019 Hi, @Sherzod Sorry, but does it need a purpose for that? I am just in doubt and need help. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 31, 2019 Share Posted August 31, 2019 4 hours ago, mikromundo said: Sorry, but does it need a purpose for that? I am just in doubt and need help. Sorry, to help you with something, please clarify your question in more detail. Quote Link to comment Share on other sites More sharing options...
mikromundo Posted August 31, 2019 Author Share Posted August 31, 2019 See this picture, please: Quote Link to comment Share on other sites More sharing options...
mikromundo Posted August 31, 2019 Author Share Posted August 31, 2019 I think something like this... UniSession.AddJS( '$(#' + TUniControl(btnObjTour).JSName + ').attr( ''data-ref'', '''')' ); but I can´t READ this value Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 31, 2019 Share Posted August 31, 2019 9 minutes ago, mikromundo said: See this picture, please: Yes, I understand that you want to get data-ref. What am I asking, where and how would you like to get it? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 31, 2019 Share Posted August 31, 2019 1 minute ago, mikromundo said: I think something like this... UniSession.AddJS( '$(#' + TUniControl(btnObjTour).JSName + ').attr( ''data-ref'', '''')' ); Do you want to change the value? Quote Link to comment Share on other sites More sharing options...
mikromundo Posted August 31, 2019 Author Share Posted August 31, 2019 For me, it's not important where, I just want to get this information. Since every uniGUI component gets a different "DATA-REF", I want to get it to assemble its ID (O87-id, O88-id-inputEl, O89-id-btnEl ...) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 31, 2019 Share Posted August 31, 2019 ... procedure TMainForm.UniButton1Click(Sender: TObject); begin UniEdit1.JSInterface.JSCode('alert('#1'.inputEl.el.dom.getAttribute("data-ref"));'); end; Quote Link to comment Share on other sites More sharing options...
mikromundo Posted August 31, 2019 Author Share Posted August 31, 2019 Thanks a lot Sherzod, I will test. Quote Link to comment Share on other sites More sharing options...
mikromundo Posted September 1, 2019 Author Share Posted September 1, 2019 He couldn't do what he wanted. Well, I may not have received the correct information, but I am trying to return to the ABSOLUTE position of the element (top and left -- X and Y ). O193 = new Ext.form.Label({ id: "O193_id", text: "Reprovados", style: "font-size:13px;font-family:Calibri;color:#FFFFFF", x: 10, y: 78 }); Quote Link to comment Share on other sites More sharing options...
mikromundo Posted September 1, 2019 Author Share Posted September 1, 2019 I found this, but I don´t know how apply in Delphi: https://www.sencha.com/forum/showthread.php?136582-Need-to-know-the-absolute-position-of-a-component 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.