rullomare Posted December 9, 2013 Posted December 9, 2013 small tips : change tunidbnavigator icon, Border at runtime. 1) add Type txnav = class(TUniDBNavigator); <<<<<============================= TFUnitName = class(TUniForm) UniLabel1: TUniLabel; ... ... navdbgrid: TUniDBNavigator; ..... ...... end; 2) add in uses clause vcl.dbctrls; <<<<<============================ 3) add UniformCreate .......... procedure TFUnitName.UniFormCreate(Sender: TObject); var jsnameButton : String Begin // Js Solution With Border and Style jsnamebutton := txnav(navadbgrid).Buttons[nbrefresh].jsname; unisession.AddJS(jsnamebutton+'.nm=' + '"' + jsnamebutton + '";_cdo_("' +jsnamebutton + '",' + jsnamebutton + ',null,FunitName);' + '_coe_(FunitName,"' + jsnamebutton + '",null,"beforerender",function(sender,eOpts) {sender.border = 1 ;' + ' sender.style = { borderColor: ''blue'', borderStyle: ''solid''} ;' + ' sender.icon = "' + servermodule.UniServerModule.FilesFolderURL + 'nbrefreshbutton.png' + '"; });' ) ; jsnamebutton := txnav(navdbgrid).Buttons[nbcancel].jsname; unisession.AddJS(jsnamebutton+'.nm=' + '"' + jsnamebutton + '";_cdo_("' +jsnamebutton + '",' + jsnamebutton + ',null,FunitName);' + '_coe_(FunitName,"' + jsnamebutton + '",null,"beforerender",function(sender,eOpts) {sender.border = 1 ;' + ' sender.style = { borderColor: ''blue'', borderStyle: ''solid''} ;' + ' sender.icon = "' + servermodule.UniServerModule.FilesFolderURL + 'nbcancelbutton.png' + '"; });' ) ; ................. ................. ................. ................. // Delphi Solution Without Border and Style (* txnav(navdbgrid).Buttons[nbrefresh].Glyph.LoadFromFile(servermodule.UniServerModule.FilesFolderpath+'nbrefreshbutton.png') ; txnav(navdbgrid).Buttons[nbcancel].Glyph.LoadFromFile(servermodule.UniServerModule.FilesFolderpath+'nbcancelbutton.png') ; txnav(navdbgrid).Buttons[nbedit].Glyph.LoadFromFile(servermodule.UniServerModule.FilesFolderPath+'nbeditbutton.png') ; txnav(navdbgrid).Buttons[nbinsert].Glyph.LoadFromFile(servermodule.UniServerModule.FilesFolderURL+'nbinsertbutton.png') ; txnav(navdbgrid).Buttons[nblast].Glyph.LoadFromFile(servermodule.UniServerModule.FilesFolderPath+'nblastbutton.png') ; txnav(navdbgrid).Buttons[nbnext].Glyph.LoadFromFile(servermodule.UniServerModule.FilesFolderPath+'nbnextbutton.png') ; txnav(navdbgrid).Buttons[nbprior].Glyph.LoadFromFile(servermodule.UniServerModule.FilesFolderPath+'nbpriorbutton.png') ; txnav(navdbgrid).Buttons[nbfirst].Glyph.LoadFromFile(servermodule.UniServerModule.FilesFolderPath+'nbfirstbutton.png') ; txnav(navdbgrid).Buttons[nbdelete].Glyph.LoadFromFile(servermodule.UniServerModule.FilesFolderPath+'nbdeletebutton.png') ; txnav(navdbgrid).Buttons[nbpost].Glyph.LoadFromFile(servermodule.UniServerModule.FilesFolderPath+'nbpostbutton.png') ; *) end; P.s. have not been able to monitor if there are any performance issues on the Internet. Regards Salvatore Marullo 1 Quote
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.