Loading...
 
Multi-Language Add-In for VB6

Multi-Language Add-In for VB6


Not able to translate items in Combo box

Hi,

I have just started evaluating this tool and found it pretty good.

Just wanted to know how can I localize items in Combo box and List box as I can't see the items when I open Multi-Language AddIn from VB 6.0.

Thanks
Rinkesh

Germany

It is possible, but by default they are not selected. Very often, list boxes and combo boxes are filled at runtime, so there is no need to localize the values specified at design time.

The VB6 Add-In has a so called controls database, which defines which properties must be localized. To localize the list properties you must select them in the controls database.

You can access the controls database via the toolbar (3rd button, yellow database icon) but I find it easier via the context menu as follows.

Start by scanning your project. Locate the ListBox or ComboBox in the grid. Click on it with the right hand mouse key and select "Edit in Controls Database" from the context menu.

Image

This will open the editor and automatically select the correct control (in this case the ListBox).

Locate the List property and click on the check-box.

Image

Because this property has an index parameter, there is a simple wizard.

In the first step, specify that the array size is defined by a property.

Image

In the second step select the property: ListCount.

Image

In the third step, specify that the array index is zero based, then click on finish.

Image

Now there should be an entry in the window at the bottom left of the dialog, showing how the property is defined.

Click on "Close" to close the controls database editor.

Image

The next thing to do is to rescan the controls in the project.

Image

And now you can see that the list items are detected by the Add-In and can be localized.

Image

You can do exactly the same for the ComboBox.

You can use the controls database to specify the properties which must be localized for any third party controls, or for your own UserControls. There is only one limitation. It cannot handle UserControls defined within the same component.

Phil