Hornbydd

Filter type does not honour GXObjectFilter

Discussion created by Hornbydd on Sep 2, 2011
Latest reply on Sep 2, 2011 by Neil
All,

Just want to run this past the ArcObject Gurus\ESRI to make sure I'm not doing something dumb.

I have created an instance of a GXDialog and set the ObjectFilter to Personal GeoDatabase. My code is below:

Public Sub test()
    Dim pGXDialog As IGxDialog
    Set pGXDialog = New GxDialog

    ' Set properties   
    Dim pGXObjectFilter As IGxObjectFilter
    Set pGXObjectFilter = New GxFilterPersonalGeodatabases
    Set pGXDialog.ObjectFilter = pGXObjectFilter
    pGXDialog.Title = "Locate Access Database"
    pGXDialog.AllowMultiSelect = False
    pGXDialog.ButtonCaption = "Open"
   
    ' Open dialog   
    Dim pEnumGXObject As IEnumGxObject
    pGXDialog.DoModalOpen 0, pEnumGXObject
   
    ' Get Object   
    Dim pGXObject As IGxObject
    Set pGXObject = pEnumGXObject.Next
End Sub


The resulting Dialog has a file type of File and Personal GeoDatabases which means a user can potentially select a File GeoDatabase which would be a problem. See image below. Is this a bug in ArcObjects?

Duncan

Attachments

Outcomes