TCrDbGrid "FilterBar and SearchBar" translation

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Zsolt Csillag
Posts: 30
Joined: Sun 28 May 2006 16:09

TCrDbGrid "FilterBar and SearchBar" translation

Post by Zsolt Csillag » Fri 13 Jul 2007 20:51

Hello,


At the upper left corner of a CrDbGrid is a small button that shows after clicking on it the "Filtered","Filter bar" and "Search bar" texts.

Can I somehow translate them to other languages.

It can be annoying to the customer that everything in the program is Hungarian, except these are in English.

Thank you in advance

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 16 Jul 2007 09:37

You can open the CRGrid unit, and replace constants in the resourcestring sections.
Another way is to create your own popup menu and assign it to CRDBGrid:

Code: Select all

    CRDBGrid.OptionsMenu := PopupMenu1;

Zsolt Csillag
Posts: 30
Joined: Sun 28 May 2006 16:09

TCrDbGrid "FilterBar and SearchBar" translation

Post by Zsolt Csillag » Mon 16 Jul 2007 16:50

Hello,

Thank you for the answer.
I replaced the constants in the resourcestring sections.

When I linked the CRGrid.pas directly to my program it worked well, but not globally, not in other programs (I rebuilt them of course).

I deleted all CRGrid.dcu-s, put the CRGrid.pas in a project of mine, rebuilt the project, but the result was the same.

I don't know how to rebuild the whole component of yours. I use Delphi 2006. (In earlier Delphis this was easier - at least to me)

Thank you

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 18 Jul 2007 09:00

The TCRDBGrid class is included in the crcontrols package. You should uninstall this package (Components\Installed Packages), and delete all CRGrid.dcu entries on your hard drive. Then open the %Mydac for Delphi 2006%\CRDBGrid\Source\Delphi10\crcontrols100.dpk package, build, and install it. Probably it will be necessary to provide path to the CRGrid.pas file in your IDE.

Zsolt Csillag
Posts: 30
Joined: Sun 28 May 2006 16:09

Post by Zsolt Csillag » Thu 19 Jul 2007 12:05

Hello,

Thank you very much for your help.
It is working.

Post Reply