Topic: System popups

I want to write a Dutch application. But is it possible to translate the English system popuptext to a Dutch text? See the two images.

Post's attachments

Attachment icon DeleteEmptyRecord.PNG 3.82 kb, 466 downloads since 2016-12-16 

Re: System popups

Hello.


You can replace this dialog.
Example, how to replace this dialog and a dialog for confirmation of delete record:



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: System popups

Thanks voor your quick answer. I will try your solution and then (if it works for me) I will order.

Re: System popups

Can you please help me, I'm a beginner and donot understand your solution. I enclosed my application/

Re: System popups

My application

Re: System popups

akkerhof wrote:

Can you please help me, I'm a beginner and donot understand your solution. I enclosed my application/

Please attach you project (zip file without exe and dll)

Dmitry.

Re: System popups

My application

Post's attachments

Attachment icon Temp.zip 4.33 kb, 611 downloads since 2016-12-16 

Re: System popups

akkerhof wrote:

My application

Done.


In your project you just copy and paste script from forum,but you should create an event  OnClick for the button.
Here you can see how to create an event:
http://myvisualdatabase.com/help_en/scr … rview.html

Dmitry.

Re: System popups

It seems I cannot make it working. Can you please adapt my aplication, so I can check how it works. Please!

Re: System popups

akkerhof wrote:

It seems I cannot make it working. Can you please adapt my aplication, so I can check how it works. Please!

Sorry, I just forgot to attach fixed project.

Post's attachments

Attachment icon Temp_fixed.zip 5.47 kb, 632 downloads since 2016-12-16 

Dmitry.

Re: System popups

Thanks very much, now it is clear and working. Have a nice weekend.

Re: System popups

The next problem that rises is that I cannot translate the text of the Caption and the Yes and No button

Post's attachments

Attachment icon messagedlg.PNG 4.49 kb, 455 downloads since 2016-12-18 

Re: System popups

akkerhof wrote:

The next problem that rises is that I cannot translate the text of the Caption and the Yes and No button

In the next release I will add new version of dialog, where you can change caption, and buttons will be translated automatically depends on regional setting of Windows.

Dmitry.

Re: System popups

Dmitry, that's very good news. I can't wait. Happy holidays for you and your family.

Re: System popups

akkerhof wrote:

Dmitry, that's very good news. I can't wait. Happy holidays for you and your family.

Thank you.
Please download latest beta version:
https://www.dropbox.com/s/1y0jek64gzfdy … a.zip?dl=0


Examples:

    if IDYES = MessageBox('Message', 'caption text', MB_YESNO+MB_ICONQUESTION) then
    begin
        ShowMessage('Selected yes');
    end;
MessageBox('Message', 'caption text', MB_OK+MB_ICONINFORMATION);
Dmitry.