Is This Content Helpful?
We're glad to know this article was helpful.
Instead of having default values and colors appear in the Symbol Selector dialog, you may want to populate the dialog with custom symbols, colors, and sizes.
Note: For more information on creating a UIControl, see the ArcGIS Desktop Help topic: 'Creating custom commands with VBA and UI Controls'
Code: Dim pSymbolSelector As ISymbolSelector Dim pMarkerIn As IMarkerSymbol Dim pMarkerOut As IMarkerSymbol Dim pSymbol As ISymbol Dim pColorIn As IRgbColor Dim pRGBColorOut As IRgbColor Set pMarkerIn = New CharacterMarkerSymbol Set pSymbolSelector = New SymbolSelector Set pColorIn = New RgbColor pColorIn.Red = 25 pColorIn.Green = 25 pColorIn.Blue = 150 pMarkerIn.Color = pColorIn pMarkerIn.Angle = 45 pMarkerIn.Size = 15 ' X and Y Offset values are not persisted. ' This is a known issue. ' pMarkerIn.XOffset = -5 ' pMarkerIn.YOffset = 2 pSymbolSelector.AddSymbol pMarkerIn If pSymbolSelector.SelectSymbol(0) Then ' The SymbolSelect Dialog popped up Set pSymbol = pSymbolSelector.GetSymbolAt(0) ' Capture the values set by the user Set pMarkerOut = pSymbol Set pRGBColorOut = pMarkerOut.Color Else MsgBox "User cancelled" End If
Note: Values for the XOffset and YOffset propeties of the symbol object do not persist. This is a known issue.