Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
Delete layer select in VB.NET windows application
Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
Hi How can I delete the selected layer only with a Button1_click or Key Del?
Thank you for replay
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi, You can delete selected layer using Remove() method with Button1_click: Code:MultiLayerViewer1.Layers.Remove(layer)
See also MutiLayer Image Editor sample. |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
ok
but as I declare the selected layer?
dim layer....................................?
Thank you Tamila and sorry for my more questions :)
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
It is a very easy. For example: Code:Dim layer As Aurigma.GraphicsMill.WinControls.Layer = MultiLayerViewer1.CurrentLayer
MultiLayerViewer1.Layers.Remove(layer)
|
|
|
|
|
Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
ok work but remove all :( no single object select why? I have see example multi layer image editor in vb.net and i view RemoveSelectedObjects() but is refer to _ObjectListBox But if i not have a listbox ? thank for reply Maurizio Edited by user Thursday, May 6, 2010 9:33:51 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi, Even through you do not use ListBox object, you should use some array where you safe the indexes of each added VObjects. For more understanding of internal logic of Vector Objects I recommend you to read the following article: Using Vector ObjectsIt helps you to understand how to work with Vector Objects. |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 4/6/2010(UTC) Posts: 24
|
it's ok for Remove layer Dim layer As Aurigma.GraphicsMill.WinControls.Layer = MultiLayerViewer1.CurrentLayer MultiLayerViewer1.Layers.Remove(layer)
but for remove VObject in Layer?
:(
Thank you Maurizio
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi, If you want to remove VObjects from layer you should use this code: Code:For Each i As Aurigma.GraphicsMill.WinControls.IVObject In MultiLayerViewer1.CurrentDesigner.VObjects
MultiLayerViewer1.CurrentLayer.VObjects.Remove(i)
Next
|
|
|
|
|
Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
Delete layer select in VB.NET windows application
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.