Solved

Tgroupbox caption

Posted on 2003-11-05
6
307 Views
Last Modified: 2010-04-05
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
Comment
Question by:sal1150
  • 3
  • 3
6 Comments
 
LVL 5

Expert Comment

by:snehanshu
ID: 9686082
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
 

Author Comment

by:sal1150
ID: 9692972
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
 

Author Comment

by:sal1150
ID: 9692995

*[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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 5

Accepted Solution

by:
snehanshu earned 60 total points
ID: 9693130
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
 
LVL 5

Expert Comment

by:snehanshu
ID: 9822144
sal1150,
Were you able to solve the problem? How?
...Shu
0
 

Author Comment

by:sal1150
ID: 9828407

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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question