We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

BaseElement.CalculateElementPos

Thread ID:

Created:

Updated:

Platform:

Replies:

99993 Jun 24,2011 02:24 PM UTC Jun 29,2011 09:28 AM UTC WinForms 3
loading
Tags: HTMLUIControl
Randolph Webb
Asked On June 24, 2011 02:24 PM UTC

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


Randolph Webb
Replied On 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



Randolph Webb
Replied On 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




Vallarasu S [Syncfusion]
Replied On 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.



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;