PDA

View Full Version : strange controls behavior



Pocus
16-08-2006, 08:48 AM
Hi all,

I'm in the process of adapting a utility in Russian language. I have already prepared, by a Russian, the localized strings of the various controls of the utility.

Now the oddity begin here. The TLabel work properly, when the TFont.Charset property is set to CHARSET_RUSSIAN. I get nice Cyrillic text displayed (on my westerner windows).

But no other control work like that. TSpeedButton for example just don't display properly (with the Russian charset!) Cyrillic.

What is more, even if I use a TNT Speed Button (that supports unicode) and if I set the charset to Russian, it don't work too.

Only the TLabel are ok. I wonder where the problem can be? Any clues?

Thanks in advances.

savage
16-08-2006, 11:43 AM
Hi Pocus,
I have used TNT controls ( EditBox etc ) to accept Russian text. Are you able to put together a very small example that shows the problem. I have TNT installed at home so can have a look at it.

Clootie
16-08-2006, 02:48 PM
Are you sure that font you are using for buttons has russian glyphs [on your system]?

Pocus
16-08-2006, 04:36 PM
Hi,

All controls use the same font, MS Sans Seriff.

I put a tiny app on the web as a proof of concept:

http://archon.free.fr/misc/Cyrillic.rar


There is 4 controls on the form (all are using Russian Charset, MS Sans seriff):

TLabel, TButton, TntLabel, TntButton

They are all expected to show a small Cyrillic string. Only the TLabel behave correctly, the others 3 don't.

:?: :roll:

Clootie
16-08-2006, 07:39 PM
On mine notebook with cyrillic locate activated all 4 controls correctly display cyrillic text.

Pocus
16-08-2006, 09:13 PM
ok, even with RU language activated (regional setting) it works only as I describe.

The most important thing being that it shows correctly on russian computers, I will then ignore what I see. :)

Thanks all for the input.

Clootie
16-08-2006, 11:29 PM
Did you install russian keyboard layout? Cos [I'm not sure here] regional settings (like date format, currency, etc) are not equal to keyboard layout / font glyphs availability.

Pocus
17-08-2006, 06:41 AM
yes the Russian keyboard is installed automatically when I choose to install Russian. I think (I hope, it would not be consistent otherwise) that when I switch to russian, Windows switch to russian keyboard too.



Edit: You are right, but this is not installed automatically when you choose to switch to Russian and Russian keyboard. You have also to specify in Regional Settings/Advanced Options which language to use for non-unicode programs.

Clootie
17-08-2006, 10:17 PM
Edit: You are right, but this is not installed automatically when you choose to switch to Russian and Russian keyboard. You have also to specify in Regional Settings/Advanced Options which language to use for non-unicode programs.
At some point I've actually decided to write about this, but... you are setting "Charset" property to "RUSSIAN_CHARSET" and this [as I've thought] should remove the need to force "non-unicode programs" charset to russian...