I have created a composite control containing an Image control for displaying image. What I need is to place four anchors on the image and that should be movable(Top,bottom,right and left). I am planning to use image control for that.How can I put those
anchors on top of the loaded Image ?
No the image should not move. The user can re-position the four anchor on the image by dragging the anchors and I need to find the distance between left-right and top-bottom anchors.
You can try using <div> or panels, and zindex them in the proper sequence. Make 2 panels and give them the same coordinates, but the 2nd one has a higher z-index value. The use png images with transparency to overlay the div below.
Or load the image as a background image, and create your control so it overlapps the background image, but is on the primary layer.
You calculate the distance by getting the current x of the right anchor - current left of the left anchor using javascript or jquery.
I don't see this as being a server control question, but more of a css or html question in general.
pvsenan
0 Points
2 Posts
Composite control with Image control
Apr 05, 2012 09:44 AM|LINK
I have created a composite control containing an Image control for displaying image. What I need is to place four anchors on the image and that should be movable(Top,bottom,right and left). I am planning to use image control for that.How can I put those anchors on top of the loaded Image ?
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Composite control with Image control
Apr 07, 2012 01:37 AM|LINK
Hello:)
Would you mind showing us your current work of codes?
What do you mean by"movable"?Do you mean when I click each of these anchors,the whole image can move?
pvsenan
0 Points
2 Posts
Re: Composite control with Image control
Apr 09, 2012 05:00 AM|LINK
Hi,
No the image should not move. The user can re-position the four anchor on the image by dragging the anchors and I need to find the distance between left-right and top-bottom anchors.
Anik Sh - MS...
Member
63 Points
16 Posts
Re: Composite control with Image control
Apr 10, 2012 09:07 AM|LINK
is it ok to set image as background image in the control and then you can add anchors.
also, you may use the AddAt method to place anchors control at a specific location — for example, in front of other controls
http://msdn.microsoft.com/en-us/library/kyt0fzt1(v=vs.71).aspx
jkirkerx
Contributor
3750 Points
873 Posts
Re: Composite control with Image control
Apr 21, 2012 11:44 PM|LINK
You can try using <div> or panels, and zindex them in the proper sequence. Make 2 panels and give them the same coordinates, but the 2nd one has a higher z-index value. The use png images with transparency to overlay the div below.
Or load the image as a background image, and create your control so it overlapps the background image, but is on the primary layer.
You calculate the distance by getting the current x of the right anchor - current left of the left anchor using javascript or jquery.
I don't see this as being a server control question, but more of a css or html question in general.