Page 1 of 1

TCRDBGrid and OnKeyPress

Posted: Tue 28 Oct 2008 19:55
by rihoe
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 ?

Posted: Thu 30 Oct 2008 08:26
by Dimon
MyDAC includes sources of TCRDBGrid. So you can modify it as you like. Note, that this component is freeware, and no more developed.