Problem With Table

jothis

Active Member
Licensed User
HI
I created a program for taking orders.
and My Program Show A error
Please see Attachment

Please Help me

Jothis
:sign0085:
 

Attachments

  • 2.zip
    2.6 KB · Views: 186
Your programm doesn't know these values:

OrdersTxt=TextTransArray(5)
BackTxt=TextTransArray(6)
Notxt =TextTransArray(8)
ItemCodeTxt=TextTransArray(9)
ItemTxt=TextTransArray(10)
QtyTxt=TextTransArray(11)
AmountTxt=TextTransArray(12)

If you want to name columns you should assign the values.

Btw it is pretty easy to understand.
I'm not a B4P expert but it took me 5 minutes to spot the problem.
 

jothis

Active Member
Licensed User
Iam assigining the value in UpdateLanguage Function

Iam updating the language in UpdateLanguage Function
You Don't see that?
I popuped a message box in this function like
Msgbox(ItemCodeTxt)
it is printing the Right Translation while changing value in listbox
But i cant get the value in Designer Function. Is there any way to assign This value to tablehedding ?
help me
jothis
:sign0085:
 

klaus

Expert
Licensed User
Longtime User
You have several problems in your program:
- the TextTransArray variables are NOT initialized in the Designer routine because LANGUAGECODE=""
- if you set LANGUAGECODE="101" you get the header names
- unfortunately if you set LANGUAGECODE="102" , the variable TextTransArray(8)="" because in your database there is no string in, so you get the same error.
- you can't call UpdateLanguage at the beginning because the different objects are not yet defined.
- in lines 45-47 you should replace the text by the variables
replace AddLabel("LOGINFORM","usernamelabel",10,30,90,20,"Username")
by AddLabel("LOGINFORM","usernamelabel",10,30,90,20,TextTransArray(0))

Once you have set the Table header texts you cannot change them afterwards. The only way is to dispose the table and initialize it again.

Why do you add all controls at runtime and not in the form designer. You don't see the layout and you are loosing the very interesting Autocomplete feature. In that case you could call UpdateLanguage at the beginning.

Best regards.
 

jothis

Active Member
Licensed User
Thankyou for helping me

Thank You For Helping me klaus
Can you Please tell me how to dispose the table and re initialize it in my program

i used this one

vieworders.Dispose

Can you tell me how to re initialize it?

please help me
jothis
:sign0085:
 
Just create a Sub initializing a table and call it whenever you want to reinitialize
the table

Your profile says you know the basics but you don't seem to do :):)
No offence
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Here you are.

Why do you add all controls at runtime and not in the form designer. You don't see the layout and you are loosing the very interesting Autocomplete feature. In that case you could call UpdateLanguage at the beginning.
I am a little disappointed because every time we ask you any question you almost never answer those questions, why?

Best regards.
 

Attachments

  • Table.zip
    2.5 KB · Views: 181

specci48

Well-Known Member
Licensed User
Longtime User
Can you tell me how to re initialize it?
What exactly are you trying to attempt?
Do you want to resize/reposition the table? Add or delete columns?
Or just delete all rows (this is done with vieworders.clear)?



specci48
 

klaus

Expert
Licensed User
Longtime User
Hi specci48,

He wants to change the header names when he changes the language.
The header names cannot be changed by code, so the only way is to dispose the table and initilize it again with the new headers and loading the table content once more.
I had the same kind of problem in some of my programs.
I solved it in a little different way. After a language change I changed the header names only on the next start of the program, the index of the current language beeing saved in an init file after leaving the program.

Best regards.
 

jothis

Active Member
Licensed User
But I got Some Other Problems

Hi, again

I got another problem in my program.

I wish to add a search in order section. Because I added a listbox here also added a button named search

My Problem is When I try to change my language In the Login form The Search Listbox Contents are not translating to the selected language.
Is there any way to do it?
Please help me
i attached code here
jothis
:sign0085:
 

Attachments

  • Login11.zip
    2.8 KB · Views: 203
Last edited:

jothis

Active Member
Licensed User
But I got Some Other Problems

Hi

I got another problem in my program.

I wish to add a search in order section. Because I added a listbox here also added a button named search

My Problem is When I try to change my language The Listbox Contents are not translating to the selected language.
Is there any way to do it?
Please help me
i attached code here
jothis
:sign0085:
 
Last edited:

klaus

Expert
Licensed User
Longtime User
My Problem is When I try to change my language In the Login form The Search Listbox Contents are not translating to the selected language.
Is there any way to do it?
For shure there is a way.
You must initialize the ListBox with the new words!

Attached a solution.

I am not convinced on how you magage the tranlation database.
I am not a specialist in databases but I find that you should have one column per language and not all translated words in a same column and distinguish the languages by their code in another column.
I'm afraid that when you want to add another language you'll get in trouble. There is also the inconvenient that a user cannot add a language because he must modify the database.
I have used simle text files for multilanguage programs, one file for each language containing the words or sentences. In the program there are 6 possible languages predefined, the program checks if the text file for a language does exist and enables the selecting of that language otherwise this language is disabled. Adding the text file for a none existing language automatically enables that one.

Best regards.
 

Attachments

  • Login13.zip
    2.6 KB · Views: 164
Top