BaseElement.CalculateElementPos

Hello Vallarasu

I have a question about the BaseElement.CalculateElementPos
DOC DESCRIPTION: Calculates the position of the HTML element.

- Is there a sample demonstrating usage
- What does this method return? In my custom html/ASP.Net designer, I need to be able to get the X and Y positions of an element both…
o relative to the visible control
o relative to the html document width and height

Thanks,

Randolph


3 Replies

RW Randolph Webb June 24, 2011 11:14 PM UTC

Hello Vallarasu

Please hold off on response to this question. I found a sample called 'Element Coordinates' which from my read seems to provide access to the data I need. I'll let you know if this does not work. Thanks.

- Randolph




RW Randolph Webb June 25, 2011 12:41 AM UTC

Hello Vallarasu

I've looked at the code from this sample and it appears it shows how to retrieve the position and additionally calculate the rectangle of an element. I don't know if you recall my use paatern, but for my solution I think I'll need to hittest the HTMLUIControl to get at the clicked element. I'll raise this privately with more info in the Direct Trac Support System. Thanks.

- Randolph





VS Vallarasu S Syncfusion Team June 29, 2011 09:28 AM UTC

Hi Randolph,

Thanks for your interest in Syncfusion products,

You can make use of the 'GetElementAtClientPoint' member of the HTMLUIControl to get the Location and Size of the element under the mouse pointer.

IHTMLElement element = this.htmlUIControl.GetElementAtClientPoint(e.Location);

A sample implementing this member is posted in the following thread,

http://www.syncfusion.com/support/forums/htmlui-windows/99990/

Refer the sample and let us know if you need any further assistance.

Regards
Vallarasu S.



Loader.
Up arrow icon