Jump to content

Recommended Posts

Posted

With Windows EXE's I often change the MessageDlg Button Captions in code (mbYesNoCancel Captions--> "Colour", "B/W", "Cancel"), please show me how with UniGUI (I am using Mobile) - Thanks in advance.

MessageDlg('Print In ?', mtConfirmation, mbYesNoCancel, MessageDlgCallBack);

Posted

I would like control over both ("Email PDF In", "Phone Numbers").

                MessageDlg('Email PDF In', mtConfirmation, [mbYes, mbNo, mbCancel], MessageDlgCallBack);
                UniSession.AddJS('Ext.select("#ext-messagebox .x-messageboxtitle .x-text-el").setText("Phone Numbers")');
                UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[0].innerHTML="Colour"');
                UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[1].innerHTML="B/W"');
                UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[2].innerHTML="Cancel"');
 

Posted
5 minutes ago, andyhill said:

I do not want this to be global, can you please show me using the Ext.select code above.

  ...
  UniSession.AddJS('Ext.select("#ext-messagebox .x-messagebox-text").elements[0].style["text-align"]="center"');

 

Posted (edited)

It paints the same in Mobile iOS, I need to either add an icon where I have put the red mark -or- move the caption left.

MsgDlg2.jpg

Edited by andyhill
Posted
On 3/26/2020 at 3:11 AM, andyhill said:

It paints the same in Mobile iOS, I need to either add an icon where I have put the red mark

One possible solution, for example:

  // 24x24 files/Status-dialog-information-icon.png
  UniSession.AddJS('Ext.select("#ext-messagebox .x-icon-el").elements[0].style["background-image"]="url(files/Status-dialog-information-icon.png)";');
  UniSession.AddJS('Ext.select("#ext-messagebox .x-icon-el").elements[0].style["height"]="24px";');
  UniSession.AddJS('Ext.select("#ext-messagebox .x-icon-el").elements[0].style["width"]="24px";');

msgboxicon.png.0c920fec39fabc5cce2902045c83700e.png

Posted

Sherzod, It does not paint icon (no errors), my icon information-icon.png exists - Mobile App testing on windows chrome /m emulation.

I tried 

"url(images/information-icon.png)" and "images/information-icon.png"
Posted
6 hours ago, andyhill said:

It does not paint icon (no errors), my icon information-icon.png exists - Mobile App testing on windows chrome /m emulation.

Hello Andy, 

Can you make a simple testcase? 

Posted

I have been crazily busy Sherzod so test case will come shortly.

In the meantime, can I please have the same ability to Name Buttons for Desktop - thanks in advance (below only works on Mobile).

UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[0].innerHTML="Colour"');
UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[1].innerHTML="B/W"');
UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[2].innerHTML="Cancel"');

Posted
45 minutes ago, andyhill said:

In the meantime, can I please have the same ability to Name Buttons for Desktop - thanks in advance (below only works on Mobile).

Hello,

Also this post may help you:

 

Posted

  //////////////////////////////////////////////////////////////////////////////
  // mbYes, mbNo, mbCancel

  // THESE FAIL
  //UniSession.AddJS('Ext.Msg.getStandardButtons().ok.text="OK"');
  //UniSession.AddJS('Ext.Msg.getStandardButtons().yes.text="Families"');
  //UniSession.AddJS('Ext.Msg.getStandardButtons().no.text="Groups"');
  //UniSession.AddJS('Ext.Msg.getStandardButtons().cancel.text="Cancel"');
 

  ?? This WORKS
  Script.Clear;
  s:= 'Ext.onReady(function() '+
      '{ '+
      '  Ext.MessageBox.buttonText = '+
      '  { '+
      '    ok: "OK", '+
      '    cancel: "Cancel", '+
      '    yes: "Families", '+
      '    no: "Groups" '+
      '  }; '+
      '} '+
      '); ';
  Script.Add(s);
 

Incidentally I want a PRIVATE solution for each use, not a Form Wide solution.

Posted

  s:= 'Ext.onReady(function() '+
      '{ '+
      '  Ext.MessageBox.buttonText = '+
      '  { '+
      '    ok: "OK", '+
      '    cancel: "Cancel", '+
      '    yes: "Families", '+
      '    no: "Groups", '+
      '    abort: "Noticeboard" '+
      '  }; '+
      '} '+
      '); ';
 

    MessageDlg('Email PDF', mtConfirmation, [mbYes, mbNo, mbCancel, mbAbort], MessageDlgCallBack);
 

FAILS TO DISPLAY ABORT BUTTON ???

Posted
23 minutes ago, andyhill said:

FAILS TO DISPLAY ABORT BUTTON ???

/*
* Ext.MessageBox internal button array:
*
* [0] 'OK'
*
* [1] 'Yes'
*
* [2] 'No'
*
* [3] 'Cancel'
*/

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...