60000369 I do not want to display the Selecting crossing green and window blue rectangle and selected entities not to be added in grip selections.

Article 60000369
Type HowTo
Product Engine
Date Added 1/4/2008 12:00:00 AM
Fixed (1/4/2008 12:00:00 AM)
Submitted by yinzd

Summary

I do not want to display the Selecting crossing green and window blue rectangle and selected entities not to be added in grip selections.

Solution

Example in C# with vdFrameControl in a application Form:

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using VectorDraw.Professional.vdCollections;

namespace WindowsApplication1

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

protected override void OnLoad(EventArgs e)

{

base.OnLoad(e);

//do not show the green and blue selecting colors

vdFramedControl1.BaseControl.ActiveDocument.GlobalRenderProperties.SelectingCrossColor = Color.Empty;

vdFramedControl1.BaseControl.ActiveDocument.GlobalRenderProperties.SelectingWindowColor = Color.Empty;

vdFramedControl1.BaseControl.ActiveDocument.OnFilterFigure += new VectorDraw.Professional.vdObjects.vdDocument.FilterFigureEventHandler(ActiveDocument_OnFilterFigure);

}

void ActiveDocument_OnFilterFigure(object sender, VectorDraw.Professional.Constants.VdConstFilterFig JobId, VectorDraw.Professional.vdPrimaries.vdFigure fig, ref bool cancel)

{

//do not add the entities in default vdraw grip selections.

if (JobId != VectorDraw.Professional.Constants.VdConstFilterFig.FILTERFIG_SELECT) return;

if (fig == null) return;

vdSelection gripset = sender as vdSelection;

if (gripset == null) return;

if (!gripset.Name.StartsWith("VDGRIPSET")) return;

cancel = true;

//throw new Exception("The method or operation is not implemented.");

}

}

}

Send comments on this topic.