I can set MyDrawObject.IsSelected to true in code but it seems to instantly get switched back to false. The only places in the draw object code I see IsSelected get set to false seem to have no relevance on this when I code my own draw object.
Example simple script I'm using as a test
private Rectangle zone = null; protected override void OnBarUpdate() { //Add your custom indicator logic here. if (State < State.Realtime) return; if (zone == null) { foreach (IDrawingTool draw in DrawObjects) { if (draw is DrawingTools.Rectangle && zone == null) { zone = draw as Rectangle; zone.IsSelected = true; } } } if (zone != null) { Print("zone.IsSelected: " + zone.IsSelected); } }
If this is not possible I was thinking I could customize a draw object such that it would select itself when the "fill area" is clicked, however it seems the draw objects "mouse down" event only gets called when the outline is clicked.
Comment