andyhill Posted April 3, 2023 Share Posted April 3, 2023 I have used this code for a long time but now need 4 Buttons instead of 3. At present it only paints the first 3 buttons - any ideas how to force the 4th button to be painted ? Thanks in advance MessageDlg(DateStr, mtConfirmation, [mbOK, mbYes, mbNo, mbAll], msgMyCallback); UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[0].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="One"'); UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[1].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="Two"'); UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[2].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="Three"'); UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[3].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="Four"'); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2023 Share Posted April 4, 2023 Hello, Don't use mbAll, use mbCancel instead and then following lines of code: 7 hours ago, andyhill said: UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[0].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="One"'); UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[1].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="Two"'); UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[2].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="Three"'); UniSession.AddJS('Ext.select("#messagebox-1001 .x-btn").elements[3].querySelectorAll(''[data-ref="btnInnerEl"]'')[0].innerHTML="Four"'); Quote Link to comment Share on other sites More sharing options...
andyhill Posted April 4, 2023 Author Share Posted April 4, 2023 Thanks Sherzod, works as expected. Are you saying UniGUI has not decoded all of the VCL buttons for MessageDlg ? 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.