TCRDBGrid and OnKeyPress
Posted: 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
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 ?
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;
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 ?