POST
|
I can't seem to find exactly what I need here. I am in VB .NET 2010 writing an Add In for ArcMap. I have a tool that a user clicks then selects a polygon on the map view. After the tool is clicked, I would like to change the cursor to a crosshair. Either the code I am using is wrong, or I am placing it in the wrong sub or function of the tool. I have tried Dim pMouse As IMouseCursor = New MouseCursor pMouse.SetCursor(esriSystemMouseCursor.esriSystemMouseCursorCrosshair) and Windows.Forms.Cursor.Current = Cursors.Cross both initiated from the OnActivate() sub. Any help would be great. Thanks.
... View more
09-29-2011
08:47 AM
|
0
|
6
|
7905
|
POST
|
Jeff, Works like a charm. Thanks so much for the help! Jeff
... View more
09-14-2011
12:09 PM
|
0
|
0
|
712
|
POST
|
Callout Ballon Change Color In .Net 2010 VB - I can change the color of the text in my callout balloon, but I can't seem to change the color of the balloon itself. Shadowcolor Doesn't do anything. Any help would be appreciated. Dim pTextElement As ITextElement = New TextElement Dim pElement As IElement Dim pPoint As IPoint = New Point Dim pCallOut As ICallout = New BalloonCallout Dim pTextSymbol As IFormattedTextSymbol = New TextSymbol Dim pGraphicsContainer As IGraphicsContainer = pMxDoc.ActiveView pPoint = pSelFeat.Shape pLatLonFormat.IsLatitude = True pLatLonFormat.GetDMS(pPoint.Y, lDegY, lMinY, lSecY) pLatLonFormat.IsLatitude = False pLatLonFormat.GetDMS(pPoint.X, lDegx, lMinx, lSecx) Dim lngStr As String Dim latStr As String lngStr = lDegx & Chr(176) & lMinx & "'" & lSecx & """ " & "W" latStr = lDegY & Chr(176) & lMinY & "'" & lSecY & """ " & "N" POI = pSelFeat.Value(pSelFeat.Fields.FindField("POI_NUM")) WMP = pSelFeat.Value(pSelFeat.Fields.FindField("WMP_TYPE")) pTextElement.Text = POI & vbCrLf & WMP & vbCrLf & lngStr & vbCrLf & latStr ' add coords" pTextElement.Symbol.HorizontalAlignment = 0 pTextElement.Symbol.VerticalAlignment = 1 ' now reproject so that the placement is in Single Zone pPoint.Project(pMap.SpatialReference) ' get an offset for the balloon Dim nPoint As IPoint = New Point nPoint.SpatialReference = pPoint.SpatialReference nPoint.X = pPoint.X + 500 nPoint.Y = pPoint.Y + 300 pElement = pTextElement 'pElement.Geometry = pPoint pElement.Geometry = nPoint pTextSymbol.Background = pCallOut pTextSymbol.Size = 8 Dim pColor As ESRI.ArcGIS.Display.IRgbColor = New RgbColor pColor.Blue = 50 pColor.Green = 240 pColor.Red = 50 'this changes the text color. pTextSymbol.Color = pColor 'changes the text color OK '************ this gives me an error ************ 'pTextSymbol.Background.TextSymbol.Color = pColor pCallOut.AnchorPoint = pPoint pTextElement.Symbol = pTextSymbol pGraphicsContainer.AddElement(pElement, gcnt) gcnt = gcnt + 1 pElement.Activate(pMxDoc.ActiveView.ScreenDisplay) pMxDoc.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, Nothing, Nothing)
... View more
09-13-2011
09:45 AM
|
0
|
3
|
2466
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|