Sergii Posted July 9, 2021 Share Posted July 9, 2021 ДОброго времени суток Столкнулся с проблемой. Способ изменения Title в showmessage (Mobile Application) выдает ошибку. showmessage('Пример'); UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("Пример")'); Тестовый пример ниже. Как полечить? Example.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 9, 2021 Share Posted July 9, 2021 Здравствуйте, procedure TMainmForm.UnimButton5Click(Sender: TObject); begin ShowMessage('Привет!'); UniSession.AddJS('Ext.select("#ext-messagebox .x-messageboxtitle .x-text-el").setText("Привет!")'); end; Quote Link to comment Share on other sites More sharing options...
x11 Posted July 12, 2021 Share Posted July 12, 2021 procedure MyMessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; CallBack: TUniDialogCallBackAnonProc); begin MessageDlg(Msg, DlgType, Buttons, CallBack); // далее локализация и кастомизация диалога if not UniMainModule.IsMobilePlatform then begin// десктоп UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("' + constAttention + '")');// внимание end else begin// смартфон UniSession.AddJS('Ext.select("#ext-messagebox .x-messageboxtitle .x-text-el").setText("' + constAttention + '")');// внимание if Buttons = mbYesNo then begin UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[0].innerHTML="' + constBtnYes + '"');// да UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[1].innerHTML="' + constBtnNo + '"');// нет end; UniSession.AddJS('Ext.select("#ext-messagebox .x-icon-el").elements[0].style["background-image"]="url(files/dialoginfo24.png)";');// моя иконка end; end; 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.