Checkboxes and PageControls

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
dcornelius
Posts: 7
Joined: Fri May 27, 2011 4:40 pm

Checkboxes and PageControls

Post by dcornelius »

I've got a Delphi 5 application working fairly well with translations in Spanish, Russian, and Chinese showing up with the right character set for most of the controls on the form. Labels and buttons work great, but CheckBoxes and the tabs of PageControls simply show garbage when using character sets other than the default. I've also noticed the TitleBar's caption does the same thing. I've hidden the TitleBar and placed my own top-aligned label to replace it.

My installation of Windows 7 does not have any language packs installed other than English and I'm wondering if these controls would show up just fine on a system with the native character sets for these other languages.

Right now, I've hidden the tabs of the PageControl and placed Buttons on a panel which switches the pages to take care of one problem, and am placing labels next to the CheckBoxes with their text cleared to take care of the other.

Have I gone to too much work? Or do these controls behave differently? I even tried manually setting the caption and character set of these controls but that didn't help.

Thanks,
David Cornelius
Retail Dimensions, Inc.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

Please note: all the below is related to non-Unicode Delphi versions (earlier than Delphi 2009)!

Some Delphi controls like TButton, TCombobox, TPageControl are just wrappers of Windows native controls and they draw themselves using the Default Locale settings independent from Charset settings, this is why they will work properly only when you set regional settings to the respective locale.
In order to fix this problem you can replace these controls with either controls that use Charset while drawing, like TBitBtn instead of TButton, or use Unicode controls like TMS Unicode Controls or LMD ElPack.

Please let me know if this helps.
Best regards,
Igor Siticov.
dcornelius
Posts: 7
Joined: Fri May 27, 2011 4:40 pm

Post by dcornelius »

Thank you very much! Now I understand better answers to other questions I had seen in this forum, but hadn't quite put it all together. I just downloaded the free LMD pack and the checkbox translates perfectly.

Thanks again!
David Cornelius
Retail Dimensions, Inc.
Post Reply