المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Webbrowser Control - selected Image



C# Programming
02-26-2010, 12:51 PM
Good morning all,
I am currently working on enslaving the webbrowser control to be an editor the way I like it.
One problem I steped into was the lack of beeing able to supply a target for links.

My first approach was to write my own Link-Selection window (no problem here) and it works like a charm on all text-selections.
But unfortunately not on images...
Is there a way to get the selected image?
If my text-range is empty I at least know that I have to deal with an image, but unfortunately not on which one.

I was able to iterate the link collection of the document before saving it and add a target there via setAttribute, but still I would like to know how to get the selected image.

I noticed that when using the execCommand (CreateLink) the selected image (which got a border with the resizing dots on the edges) gets a selection overlay that I am also not able to reproduce. Maybe changing the selction into that would solve the problem...

Any ideas on this one?
best regards and have a nice day http://www.barakasoft.com/script/Forums/Images/smiley_wink.gif
hoernchenmeister