GISGURU_001

I want to be able to enter a persons name into my combox so as to select it

Discussion created by GISGURU_001 on Aug 26, 2012
Latest reply on Aug 28, 2012 by GISGURU_001
I want to be able to enter a persons name into my combox so as to select it within my active view, this is the code i use which only shows my layers within my data frame; i want to be able to key-in a particular attribute i.e name so as to select the feature with this attribute in my active view.

def onFocus(self, focused):

  # When the combo box has focus, update the combo box with the list of layer names.
 if focused:
  self.mxd = arcpy.mapping.MapDocument('current')
  layers = arcpy.mapping.ListLayers(self.mxd)
  self.items = []
               for layer in layers:
  self.items.append(layer.name)

Your suggestions would be highly appreciated. Thanks

Outcomes