In this tutorial i will show you that how can we make a layer selectable or not selectable
/ / All the layers are not optional
MapInfo.Mapping.LayerHelper.SetSelectable (item, false);
/ / A layer is not optional
foreach (MapInfo.Mapping.IMapLayer layer in mapControl1.Map.Layers)
{
if (object.ReferenceEquals (layer, mapControl1.Map.Layers ["GZ_River_LL"]))
{
MapInfo.Mapping.LayerHelper.SetSelectable (layer, false);
}
}
/ / All the layers are not optional
MapInfo.Mapping.LayerHelper.SetSelectable (item, false);
/ / A layer is not optional
foreach (MapInfo.Mapping.IMapLayer layer in mapControl1.Map.Layers)
{
if (object.ReferenceEquals (layer, mapControl1.Map.Layers ["GZ_River_LL"]))
{
MapInfo.Mapping.LayerHelper.SetSelectable (layer, false);
}
}
0 comments:
Post a Comment