locked
Composite control with Image control RRS feed

  • Question

  • User-834988657 posted

    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 ?

    Thursday, April 5, 2012 5:44 AM

All replies

  • User3866881 posted

    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?

    Friday, April 6, 2012 9:37 PM
  • User-834988657 posted

    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.  

    Monday, April 9, 2012 1:00 AM
  • User-1331152188 posted

    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

     

    Tuesday, April 10, 2012 5:07 AM
  • User-16411453 posted

    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.

    Saturday, April 21, 2012 7:44 PM