andyhill Posted March 24, 2020 Share Posted March 24, 2020 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); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 25, 2020 Share Posted March 25, 2020 6 hours ago, andyhill said: using Mobile Hello, Can you test with this approach? Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 25, 2020 Author Share Posted March 25, 2020 Very good Sherzod - thank you. Is it optionally possible to center the texts ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 25, 2020 Share Posted March 25, 2020 1 hour ago, andyhill said: Is it optionally possible to center the texts ? Do you mean: "Email PDF In"? Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 25, 2020 Author Share Posted March 25, 2020 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"'); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 25, 2020 Share Posted March 25, 2020 3 minutes ago, andyhill said: I would like control over both ("Email PDF In", "Phone Numbers"). OK, I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 25, 2020 Share Posted March 25, 2020 17 minutes ago, andyhill said: "Email PDF In" You can try to use this customCSS: .x-messagebox-text { text-align: center; } Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 25, 2020 Author Share Posted March 25, 2020 I do not want this to be global, can you please show me using the Ext.select code above. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 25, 2020 Share Posted March 25, 2020 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"'); Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 25, 2020 Author Share Posted March 25, 2020 Excellent, now for one more option, using the Ext.select how do we set the Icon ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 25, 2020 Share Posted March 25, 2020 3 minutes ago, andyhill said: now for one more option, using the Ext.select how do we set the Icon ? Sorry, is this for mobile or desktop? Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 25, 2020 Author Share Posted March 25, 2020 Both Icons Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 25, 2020 Author Share Posted March 25, 2020 Mobile (Hybrid [Desktop emulation]) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 25, 2020 Share Posted March 25, 2020 3 minutes ago, andyhill said: But this is for the desktop, right? Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 25, 2020 Author Share Posted March 25, 2020 If you look at my "Phone Numbers --> Email" image above it is rendered in emulation mode "/m" but coded as Mobile. Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 25, 2020 Author Share Posted March 25, 2020 (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. Edited March 26, 2020 by andyhill Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 29, 2020 Author Share Posted March 29, 2020 Sherzod, any progress ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 29, 2020 Share Posted March 29, 2020 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";'); Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 29, 2020 Author Share Posted March 29, 2020 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" Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 30, 2020 Share Posted March 30, 2020 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? Quote Link to comment Share on other sites More sharing options...
andyhill Posted April 5, 2020 Author Share Posted April 5, 2020 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"'); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 5, 2020 Share Posted April 5, 2020 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: Quote Link to comment Share on other sites More sharing options...
andyhill Posted April 8, 2020 Author Share Posted April 8, 2020 ////////////////////////////////////////////////////////////////////////////// // 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. Quote Link to comment Share on other sites More sharing options...
andyhill Posted April 12, 2020 Author Share Posted April 12, 2020 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 ??? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 12, 2020 Share Posted April 12, 2020 23 minutes ago, andyhill said: FAILS TO DISPLAY ABORT BUTTON ??? /* * Ext.MessageBox internal button array: * * [0] 'OK' * * [1] 'Yes' * * [2] 'No' * * [3] 'Cancel' */ 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.