TCRDBGrid and OnKeyPress

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rihoe
Posts: 3
Joined: Sat 25 Oct 2008 17:55

TCRDBGrid and OnKeyPress

Post by rihoe » Tue 28 Oct 2008 19:55

Hi!

I'm having troubles matching up ŠŽšž characters in MySQL and CBuilder 5. The characters show up OK, if I set my forms font to EASTEUROPE and database to utf8_estonian_ci, but I can't enter them in my program - they come up as different symbols.
I overcame this problem by changing input in OnKeyPress

Code: Select all

	int i=Key;
	if(Key==-48)   //Š
		Key=-118;
	if(Key==-16) //š
		Key=-102;
	if(Key==-2) //ž
		Key=-98;
	if(Key==-34) //Ž
		Key=-114;
The problem is that typing into TCRDBGrid filter and search bar does not call OnKeyPress, so I can't filter "š*". It only works if I user Charmap and copy-paste characters from there - then they show up OK and filtering works.
Is it possible to cause typing into Filtering and Search fields also call OnKeyPress?
And is it possible to let developers translate the labels of the Grid menu ?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 30 Oct 2008 08:26

MyDAC includes sources of TCRDBGrid. So you can modify it as you like. Note, that this component is freeware, and no more developed.

Post Reply