Jump to content

How to modify the UniDBNavigator hint content?


szlbz
 Share

Recommended Posts

  • 6 years later...

I need change the hint, too. 
Which is the resourcestring file for change the resourcestring value?

I take example from http://www.delphibasics.info/home/delphibasicssnippets/changeresourcestringsatruntime

And put that procedure HookResourceString(rs: PResStringRec; newStr: PChar); 

I was tested on ServerModuleCreate, MainModuleCreate and MainFormCreate and nothing ....

using Vcl.Consts,  Vcl.VDBConsts

procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
begin
  HookResourceString(@SFirstRecord,          'Primer registro');
  HookResourceString(@SPriorRecord,          'Registro anterior');
  HookResourceString(@SNextRecord,           'Siguiente registro');
  HookResourceString(@SLastRecord,           'Último registro');
  HookResourceString(@SInsertRecord,         'Agregar');
  HookResourceString(@SDeleteRecord,         'Eliminar');
  HookResourceString(@SEditRecord,           'Editar');
  HookResourceString(@SPostEdit,             'Grabar');
  HookResourceString(@SCancelEdit,           'Cancelar edición');
  HookResourceString(@SConfirmCaption,       'Confirmar');
  HookResourceString(@SRefreshRecord,        'Refrescar');
  HookResourceString(@SDeleteRecordQuestion, 'Eliminar registro?');
end;

it still showing in English 

image.png.2c57b8659a5b9f5bf1af7af68c54424b.png

Edited by NizamUlMulk
More data
Link to comment
Share on other sites

14 hours ago, NizamUlMulk said:

I need change the hint, too. 

Hello,

Maybe you can try something like this...

//    'FIRST', 'PRIOR', 'NEXT',
//    'LAST', 'INSERT', 'DELETE', 'EDIT', 'POST', 'CANCEL', 'REFRESH', 'APPLYUPDATES', 'CANCELUPDATES'

procedure TMainForm.UniFormReady(Sender: TObject);
var
  btnName: string;
  btnHint: string;
begin

  btnName := 'FIRST'; //uni_dbn_xxx
  btnHint := 'First';
  UniSession.AddJS('Ext.ComponentQuery.query("[uname=uni_dbn_'+ btnName +']").forEach(function(el){el.setTooltip("'+ btnHint +'")});');

  btnName := 'PRIOR'; //uni_dbn_xxx
  btnHint := 'Prior';
  UniSession.AddJS('Ext.ComponentQuery.query("[uname=uni_dbn_'+ btnName +']").forEach(function(el){el.setTooltip("'+ btnHint +'")});');

  //...

end;

 

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...