I was afraid for this answer and it happened. Renaming seems the only solution.
Thanks.
Well, even if "you" can tell which layer is the right layer, how do the "users" know which layer they are choosing if both layers have the same name in the combo box?
I have dealt with a similar situation in .net (both vb and C#.) The way I dealt with it was to build a list of IFeatureLayers (generic list (of IFeatureLayer). Then bind the list to combobox and set the display property to "Name". This way your combobox doesn't contain a list of featurelayer name strings but a list of actual featurelayer objects. When the user picks one the selecteditem is a feature layer not a string but the featurelayer so there is no need to find the layer by name. Of course showing the user two items in a combo box with the same name is not very nice for the user. But there are other solutions to that (showing the group and name, etc.)
Thank for this tip!
I agree that showing two items with the same name is not nice.
Do you have other ideas for names without using groupnames? Something like "Buildings (1ste entry)", Buildings (2de entry) ?