Jump to content

Dúvida Caption MessageDlg


Gregue

Recommended Posts

Olá

 

Como alterar o caption da MessageDlg utilizando:
UniSession.AddJS('Ext.get("messagebox-1001_header_hd-textEl").setHTML("Texto do Caption")');
 
Dessa forma sem problemas, funcionando:
 
  MessageDlg('Teste MessageDlg'+
  #13#10+
  ' Confima ?'+
  #13#10, mtWarning, mbYesNo, x...);
  UniSession.AddJS('Ext.get("messagebox-1001_header_hd-textEl").setHTML("Texto do Caption")');
 
 
Minha dúvida é, como incluir UniSession.AddJS no exemplo abaixo:
 
procedure TMainForm.UniBitBtn1Click(Sender: TObject);
var
  vConfirmacao: Boolean;
begin
        MessageDlg('Este é um teste de Mensagem. Confirma ?', mtConfirmation, mbYesNo,
           procedure (Sender: TComponent; Res: Integer)
           begin
              vConfirmacao := Res = mrYes;
              if vconfirmacao then
                 Memo1.Lines.Add('Confirmacao = True')
              else
                 Memo1.Lines.Add('Confirmacao = False');
           end);
end;
 
 
Se alguém puder postar um exemplo, agradeço.
 
 
 
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...