picyka Posted October 7, 2021 Share Posted October 7, 2021 procedure TUnimFormGerarChaveLiberacaoM.btnGerarChaveClick(Sender: TObject); begin if Self.edProtocolo.Text = '' then begin TMessageUtils.Warning('Protocolo não informado!'); Self.edProtocolo.SetFocus; Exit; end; Self.UnimMemoChave.Text := TEncryption.Encrypt(UniMainModule.UserActive.Empresa.Id.ToString + '|' + UniMainModule.UserActive.Id.ToString + '|' + Self.edProtocolo.Text); btnGerarChave.JSInterface.JSCode('UnimFormGerarChaveLiberacaoM.UnimMemoChave.focus(true);'); btnGerarChave.JSInterface.JSCode('UnimFormGerarChaveLiberacaoM.UnimMemoChave.select();'); btnGerarChave.JSInterface.JSCode('document.execCommand(''copy'');'); end; I would like when clicking a button on mobile, copy the text of a memo, is this possible? I need this format, because before copying I need to run a rule to feed the memo. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted October 7, 2021 Share Posted October 7, 2021 11 minutes ago, picyka said: procedure TUnimFormGerarChaveLiberacaoM.btnGerarChaveClick(Sender: TObject); begin if Self.edProtocolo.Text = '' then begin TMessageUtils.Warning('Protocolo não informado!'); Self.edProtocolo.SetFocus; Exit; end; Self.UnimMemoChave.Text := TEncryption.Encrypt(UniMainModule.UserActive.Empresa.Id.ToString + '|' + UniMainModule.UserActive.Id.ToString + '|' + Self.edProtocolo.Text); btnGerarChave.JSInterface.JSCode('UnimFormGerarChaveLiberacaoM.UnimMemoChave.focus(true);'); btnGerarChave.JSInterface.JSCode('UnimFormGerarChaveLiberacaoM.UnimMemoChave.select();'); btnGerarChave.JSInterface.JSCode('document.execCommand(''copy'');'); end; I would like when clicking a button on mobile, copy the text of a memo, is this possible? I need this format, because before copying I need to run a rule to feed the memo. Hello, try here: http://forums.unigui.com/index.php?/search/&q=clipboard&quick=1 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.