1 (edited by v_pozidis 2017-08-12 12:43:01)

Topic: Other Language

Is there a way by pressing the Delete Button to get a different language instead English ?


https://i.imgur.com/bLNEZkh.jpg

Re: Other Language

Hello.


You can replace this dialog.
Example:



You should create event OnClick for a delete button, also you need to disable option "Ask for confirmation to delete the record" in the setting of the button:

procedure Form1_bDeleteButton_OnClick (Sender: string; var Cancel: boolean);
begin
    // custom message, when record in tablegrid not selected
    if Form1.TableGrid1.dbItemID=-1 then
    begin
        MessageDlg('Your message here.', mtInformation, mbOk, 0);
        Cancel := True;
        Exit;
    end;


    // custom message for confirmation of delete record
    if MessageDlg('Your message here.', mtConfirmation, mbYes+mbNo, 0) = mrNo then
    begin
        Cancel := True;
        Exit;
    end;

end;
Dmitry.

Re: Other Language

Can I also Change the YES  or NO in the Buttons in an other language?

Re: Other Language

v_pozidis wrote:

Can I also Change the YES  or NO in the Buttons in an other language?

Check out this topic
http://myvisualdatabase.com/forum/viewtopic.php?id=3084

Dmitry.

Re: Other Language

What I meant was to change the words YES No from the buttons in our home language


https://i.imgur.com/MD7OXtq.png



v_pozidis wrote:

Is there a way by pressing the Delete Button to get a different language instead English ?


https://i.imgur.com/bLNEZkh.jpg

Re: Other Language

v_pozidis
Just use MessageBox function instead MessageDlg.
Function MessageBox will translate automatically buttons to your language which uses in your Windows OS.

Dmitry.

Re: Other Language

I replace it but again the buttons are in English.
Can you send example please?






v_pozidis wrote:

Is there a way by pressing the Delete Button to get a different language instead English ?


https://i.imgur.com/bLNEZkh.jpg

Re: Other Language

Example here
http://myvisualdatabase.com/forum/viewtopic.php?id=3084


Please attach your project.

Dmitry.

Re: Other Language

Hola v_pozidis
En la acción del botón de borrar el registro, debes quitar la marca  de "Ask for confirmation to delete record" y colocar el código que te ha enviado Dimitry.

Re: Other Language

... pero debes usar la función : MessageBox() y no MessageDlg()

if IDNO = MESSAGEBOX(' Realmente quiere borrar el registro ','Confirmación',MB_YESNO+MB_ICONQUESTION) THEN
    begin
    Cancel := True;
    Exit;
    end;