JohanC Posted January 15, 2022 Share Posted January 15, 2022 How to replace images in unidbnav with Captions (e.g. New, Delete, Edit, Save, Cancel, Refresh) Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 16, 2022 Share Posted January 16, 2022 On 1/15/2022 at 3:04 PM, JohanC said: How to replace images in unidbnav with Captions (e.g. New, Delete, Edit, Save, Cancel, Refresh) Hello, One possible solution. procedure TMainForm.UniFormReady(Sender: TObject); begin JSInterface.JSCode(#1'.owner.uni_dbn_DELETE.setIcon(null);'); JSInterface.JSCode(#1'.owner.uni_dbn_DELETE.setText("Delete");'); end; Quote Link to comment Share on other sites More sharing options...
JohanC Posted January 16, 2022 Author Share Posted January 16, 2022 Thanks, Where should I call UniFormReady ? I get this error Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 16, 2022 Share Posted January 16, 2022 12 minutes ago, JohanC said: Where should I call UniFormReady ? Yes. Quote Link to comment Share on other sites More sharing options...
JohanC Posted January 16, 2022 Author Share Posted January 16, 2022 Sorry, I do not understand your reply = Yes I get the Ajax Error when I call the UniFormReady at procedure TMainForm.UniFormShow(Sender: TObject); begin UniFormReady(Sender); end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 16, 2022 Share Posted January 16, 2022 4 hours ago, Sherzod said: TMainForm.UniFormReady Use this event directly instead of calling it in the OnShow event. Quote Link to comment Share on other sites More sharing options...
JohanC Posted January 16, 2022 Author Share Posted January 16, 2022 My apology, I do not know how to use this event directly Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 16, 2022 Share Posted January 16, 2022 procedure TMainForm.UniFormReady(Sender: TObject); begin // here end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 16, 2022 Share Posted January 16, 2022 procedure TMainForm.UniFormShow(Sender: TObject); begin UniFormReady(Sender); end; Quote Link to comment Share on other sites More sharing options...
JohanC Posted January 16, 2022 Author Share Posted January 16, 2022 I did as you showed, It does not work for me Maybe I do not understand how the unidbnavigator will no what is means, (not sure what #1 refers to) JSInterface.JSCode(#1'.owner.uni_dbn_DELETE.setIcon(null);'); JSInterface.JSCode(#1'.owner.uni_dbn_DELETE.setText("Delete");'); Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 16, 2022 Share Posted January 16, 2022 Can you please make a simple test app and attach here? Quote Link to comment Share on other sites More sharing options...
JohanC Posted January 16, 2022 Author Share Posted January 16, 2022 It works when I use the uningui example project "dbnav.dproj" I will try to find out why it does not work in my project Thanks 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.