Wrong mouse location in OnClick event at System.Web.UI.Design.ControlDesiger

Discussion in 'ASP .Net Web Controls' started by algirdas.k@gmail.com, Mar 3, 2008.

  1. Guest

    I'm writing a custom ASP.NET web control, which renders some graphic
    elements. In design time, I need to be able to select those elements
    and to edit their properties. System.Web.UI.Design.ControlDesigner
    (which we extend) exposes method OnClick(DesignerRegionMouseEventArgs
    e) to handle the click on control at design time, but unfortunately
    e.Location gives correct mouse location on custom control only when
    whole design surface is visible, that is - whole designed page fits,
    there are no scrollbars and designed page is not scrolled in any
    direction.

    If design surface (designed page) is scrolled, i.e. custom control has
    changed it's position on screen, e.Location gives same results, as if
    no scroll occurred.
    (to overcome such problem in Windows.Forms, PointToClient would be
    used)

    Is this a bug in Visual Studio (I'm using 2005) and are there any
    solutions?
     
    , Mar 3, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Juergen Theis
    Replies:
    0
    Views:
    670
    Juergen Theis
    Feb 21, 2006
  2. tom arnall
    Replies:
    6
    Views:
    1,304
    Ian Shef
    Jan 18, 2007
  3. Replies:
    0
    Views:
    777
  4. masantha wee

    Mouse event (onclick)

    masantha wee, Apr 30, 2005, in forum: Javascript
    Replies:
    3
    Views:
    139
    Richard Cornford
    May 10, 2005
  5. Replies:
    2
    Views:
    160
Loading...

Share This Page