IGxDialog missing StartingLocation property?

1731
2
11-15-2010 05:24 PM
JeffreyHamblin
New Contributor III
I'm developing an Add-in with ArcGIS 10 and VS C# 2008 Express, and using a GxDialog to browse for various types of data. But I am having trouble setting the initial location.

According to the IGxDialog interface documentation there is a property named StartLocation that can be used to set "The dialog's starting location. This can be an IGxObject or a text-string containing the full name of an object."

However, the Object Browser and code completion show only a method named "set_StartingLocation()":
(see screenshot attachment #1)

Which will not accept a string:
(see screenshot attachment #2)

Is the property missing (or am I missing something), or are we supposed to use the set_StartingLocation() method? If so, I would appreciate some insight on what type of object to pass to it.

Thanks,
Jeff Hamblin
0 Kudos
2 Replies
KatrinWalz
New Contributor
You can't use a string. You have to use a reference to an object.

        object temp = "C:\\";
        gxDialog.set_StartingLocation(ref temp);
0 Kudos
by Anonymous User
Not applicable
Original User: jeffhamblin

Thank you, Katrin!!

I think I had tried everything but setting the var type as object -- casting, stringbuilder...

-Jeff
0 Kudos