LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

EasyTab panel title not changed by LocalizePanel

Solved!
Go to solution

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.

0 Kudos
Message 1 of 3
(3,294 Views)
Solution
Accepted by topic author AG78

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?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 3
(3,289 Views)

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

0 Kudos
Message 3 of 3
(3,264 Views)