01-24-2011 08:43 AM
Hello,
I'm using EasyTab panels loaded in a main panel, and I'm using LocalizePanel(,,) function to change text strings.
I'm calling LocalizePanel(,,) function for each TAB panel.
All strings included in .LWL file are correctly updated, except the titles of the TAB panels.
Did somebody already face to similar problem?
Thanks
Alain.
Solved! Go to Solution.
01-24-2011 09:39 AM
Hi Alain,
I never tried using easytab panels with a localized environment, but I suppose I have found what may be happening.
Unfortunately LocalUI instrument is not distributed with the source code, but having given a look at source code for the easytab instrument (which is distributed with CVI) I can see that if a panel is added to the easytab control at handle level (that is using EasyTab_AddPanels command) the instrument should correctly inherit tab titles from the panel titles (which supposedly you have already localized). On the other hand, you you load ther tabs at file level (that is using EasyTab_LoadPanels) the instrument loads the panels by itself without localizing them.
I suppose you are first creating the easytab control, localizing the panels only after that.
It seems to me that a possible workaround for this situation could be to operate this way:
1. Load each panel using LoadLocalizedPanel and saving the panel handle
2. Add panels to the tab control with EasyTab_AddPanels
I cannot easily try this at the moment but you should be able to try it with a few modifications to your code.
Another alternative is to post-process the easytab control using EasyTab_SetTabAttribute (, , , ATTR_EASY_TAB_LABEL_TEXT, ...); for each tab page, but this way you are loosing the automatic localization facility the instrument offers.
Last but not least: supposing you are using CVI8 or later, have you considered using native tab controls instead of easytabs?
01-25-2011 02:40 AM
Hello Roberto,
Thanks for your reply.
The solution with EasyTab_AddPanels works fine and was simple to test.
In this project I'am re-using old IHM developped with CVI7 and EasyTab library.
For the next I'll use native Tabs.
Thanks for your help.
Best regrads
Alain