Jump to content

Change caption and button in Message Dialog


pflam

Recommended Posts

Hi,

I use the below code to change the caption and button in web application; however, it does not work in mobile application.

       messagedlg('test', mtError, [mbOK], Nil);

       UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("Your Caption")');
       UniSession.AddJS('Ext.get("button-1005-btnInnerEl").setText("Your Button")');

 

Can anyone help?

 

 

Link to comment
Share on other sites

1 hour ago, pflam said:

yes, the above image is the error.

Try this approach too:

procedure TMainmForm.UnimButton1Click(Sender: TObject);
begin
  messagedlg('test', mtError, [mbOK], Nil);
  UniSession.AddJS('Ext.select("#ext-messagebox .x-messageboxtitle .x-text-el").setText("New caption")');
  UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[0].innerHTML="OK!!"');
end;

 

  • Like 1
Link to comment
Share on other sites

Hi Sherzod,

I still cannot customize the mEdit and mRadio.

2) mEdit - I need to change the font size to 9, and edit box's height to 22 (and set left margin to 0). however, the text cannot fully be shown.

                  UnimEdit001.jpg.f55555b67ee43a315f39c6b9c4f23e4f.jpg

3) The mRadio button is not clear after i change the background color to gray. Is it possible to change the color?

 

Thank You.

Link to comment
Share on other sites

×
×
  • Create New...