[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 329
  • Last Modified:

Tgroupbox caption

I store the strings caption  of controlls in inifile...all controlls accept these caption except tgroupboxs.
I Write this code:-

procedure callARABIC();
begin
try
with form1 do
begin

langfile := TIniFile.Create(ExtractFilePath(ParamStr(0))+'ARBlang.ini');
//button
cmdok.Caption := langfile.ReadString('button','cmdok',cmdok.Caption );
cmdcul.Caption := langfile.ReadString('button','cmdcul',cmdcul.Caption );
cmdclear.Caption := langfile.ReadString('button','cmdclear',cmdclear.Caption );
//box
sheet1.Caption := langfile.ReadString('box','sheet1',sheet1.Caption );
sheet2.Caption := langfile.ReadString('box','sheet2',sheet2.Caption );
Caption := langfile.ReadString('box','form1',Caption );
typebox.Caption := langfile.ReadString('box','typebox',typebox.Caption );
sbox.Caption := langfile.ReadString('box','sbox',sbox.Caption );
resultbox.Caption := langfile.ReadString('box','resultbox',resultbox.Caption );
culbox.Caption := langfile.ReadString('box','culbox',culbox.Caption );
//radio
r220.Caption := langfile.ReadString('radio','r220',r220.Caption );
c220.Caption := langfile.ReadString('radio','c220',c220.Caption );
r380.Caption := langfile.ReadString('radio','r380',r380.Caption );
c380.Caption := langfile.ReadString('radio','c380',c380.Caption );
SAREA.Caption := langfile.ReadString('radio','SAREA',SAREA.Caption );
SCONNECTED.Caption := langfile.ReadString('radio','SCONNECTED',SCONNECTED.Caption );
v220.Caption := langfile.ReadString('radio','v220',v220.Caption );
v380.Caption := langfile.ReadString('radio','v380',v380.Caption );
//Label
Sf.Caption := langfile.ReadString('label','Sf',Sf.Caption );
Sc.Caption := langfile.ReadString('label','Sc',Sc.Caption );
Sc2.Caption := langfile.ReadString('label','Sc2',Sc2.Caption );
Scbamp.Caption := langfile.ReadString('label','Scbamp',Scbamp.Caption );
Scbkva.Caption := langfile.ReadString('label','Scbkva',Scbkva.Caption );
srconn.Caption := langfile.ReadString('label','srconn',srconn.Caption );
srcont.Caption := langfile.ReadString('label','srcont',srcont.Caption );
//menuform
File1.Caption := langfile.ReadString('menuform','File1',File1.Caption );
Engneering1.Caption := langfile.ReadString('menuform','Engneering1',Engneering1.Caption );
relationdept1.Caption := langfile.ReadString('menuform','relationdept1',relationdept1.Caption );
Exit1.Caption := langfile.ReadString('menuform','Exit1',Exit1.Caption );
Option1.Caption := langfile.ReadString('menuform','Option1',Option1.Caption );
skin.Caption := langfile.ReadString('menuform','skin',skin.Caption );
noskin.Caption := langfile.ReadString('menuform','noskin',noskin.Caption );
ENGLISH.Caption := langfile.ReadString('menuform','ENGLISH',ENGLISH.Caption );
ARABIC.Caption := langfile.ReadString('menuform','ARABIC',ARABIC.Caption );
Help.Caption := langfile.ReadString('menuform','Help',Help.Caption );
subhelp.Caption := langfile.ReadString('menuform','subhelp',subhelp.Caption );
ABOUT1.Caption := langfile.ReadString('menuform','ABOUT1',ABOUT1.Caption );

end; //end with
 finally
langfile.Free ;
end;
end;
0
sal1150
Asked:
sal1150
  • 3
  • 3
1 Solution
 
snehanshuCommented:
sal1150,
  There doesn't seem any reason why that should happen.
  Can you post:
1) the names of the groupboxes in the above code (are those the ones under //box?)
2) the contents of your ini file. It could be a problem with the section-key combination.
...Snehanshu
0
 
sal1150Author Commented:
1) the names of the groupboxes in the above code are:-
                    typebox   -  sbox  -  resultbox   -  culbox
2) the contents of my ini file (arblang):-

[box]
sheet1=جداول احمال المشترك
sheet2=تحديد غرفة المحول
form1=ضوابط حساب احمال المشترك الجديدة والمعتمدة من الوزارة
typebox=انواع الجداول المقررة
sbox=خيارات البحث
resultbox=النتيجة
culbox=نتيجة الحساب

[button]
cmdok=موافق
cmdcul=حساب
cmdclear=مسح

[radio]
r220=سكني على الجهد 127/220ف
c220=تجاري على الجهد 127/220ف
r380=سكني على الجهد 220/380ف
c380=تجاري على الجهد 220/380ف
SAREA=بحث بالمساحة المشيدة
SCONNECTED=بحث بالاحمال الموصلة
v220=تغذية بـ220/127ف
v380=تغذية بـ380/220ف

[Label]
Sf=المساحة المشيدة م2
sc=الحمل الموصل ك.ف.أ
sc2=حمل الديماند ك.ف.أ
Scbamp=الحمل التعاقدي امبير
Scbkva=الحمل التعاقدي ك.ف.أ
srconn=اجمالي الاحمال الموصلة امبير
srcont=اجمالي الاحمال التعاقدية امبير

[menuform]
File1=ملف
Engneering1=الجداول
relationdept1=غرفة المحول
Exit1=الخروج
Option1=خيارات
skin=تغليف
noskin=بلاتغليف
ENGLISH=الانجليزية
ARABIC=العربية
Help=مساعدة
subhelp=ملف المساعدة
ABOUT1=عن البرنامج

[grid]
col0=
col1=
col1=

[msgbox]
mabout=
mmax=
mmin=
mtit=
0
 
sal1150Author Commented:

*[box]
sheet1=جداول احمال المشترك
sheet2=تحديد غرفة المحول
form1=ضوابط حساب احمال المشترك الجديدة والمعتمدة من الوزارة
typebox=انواع الجداول المقررة
sbox=خيارات البحث
resultbox=النتيجة
culbox=نتيجة الحساب

*[button]
cmdok=موافق
cmdcul=حساب
cmdclear=مسح

*[radio]
r220=سكني على الجهد 127/220ف
c220=تجاري على الجهد 127/220ف
r380=سكني على الجهد 220/380ف
c380=تجاري على الجهد 220/380ف
SAREA=بحث بالمساحة المشيدة
SCONNECTED=بحث بالاحمال الموصلة
v220=تغذية بـ220/127ف
v380=تغذية بـ380/220ف

*[Label]
Sf=المساحة المشيدة م2
sc=الحمل الموصل ك.ف.أ
sc2=حمل الديماند ك.ف.أ
Scbamp=الحمل التعاقدي امبير
Scbkva=الحمل التعاقدي ك.ف.أ
srconn=اجمالي الاحمال الموصلة امبير
srcont=اجمالي الاحمال التعاقدية امبير

*[menuform]
File1=ملف
Engneering1=الجداول
relationdept1=غرفة المحول
Exit1=الخروج
Option1=خيارات
skin=تغليف
noskin=بلاتغليف
ENGLISH=الانجليزية
ARABIC=العربية
Help=مساعدة
subhelp=ملف المساعدة
ABOUT1=عن البرنامج

*[grid]
col0=
col1=
col1=

*[msgbox]
mabout=
mmax=
mmin=
mtit=
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
snehanshuCommented:
sal1150,
  I must admit I have no clue of what the characters are :-(
  Can you write a simple test application which has just one group box and its caption is loaded from an inifile (A value you know that works for other controls) so that you know whether the problem is in the GroupBox control or the ini file you posted.
  And here's what I would I have tried: Since the form's caption looks a bit too long, I would place it at the end of the section and move the box captions above it in the inifile.
  THis is what I would make my box section look like:
[box]
sbox=خيارات البحث
resultbox=النتيجة
culbox=نتيجة الحساب
typebox=انواع الجداول المقررة
sheet1=جداول احمال المشترك
sheet2=تحديد غرفة المحول
form1=ضوابط حساب احمال المشترك الجديدة والمعتمدة من الوزارة

  If this doesn't help, then perhaps I have no idea. Let me know the results though.
...Snehanshu
0
 
snehanshuCommented:
sal1150,
Were you able to solve the problem? How?
...Shu
0
 
sal1150Author Commented:

No,but I want to close the question...so I shift the points to you.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now