How to get the left and top coordinate of custrom control?

Discussion in 'ASP .Net Web Controls' started by Björn Marthen, Dec 8, 2003.

  1. Hi guys,

    I wrote a custom control. I added the properties "public Unit height;" and
    "public Unit width;" to get the control sizeable. It works well. But how can
    I get the Left and Top position of the control? If I add "public Unit Top;"
    and "public Unit Left;" it doesn't work. If i moving the control in
    designtime the properties will not be updated.

    I hope you understand my problem although my bad english.
    Björn Marthen, Dec 8, 2003
    #1
    1. Advertising

  2. hi Bjorn,
    I've been having that same problem and i've posted a solution some time
    back. You might want to read that first. If your still having problems,
    askaway ;P

    http://www.developersdex.com/asp/message.asp?p=2906&ID=<TH4xb.9539$i%5
    F5%2E1073%40news%2Eedisontel%2Ecom%3E

    "Björn Marthen" <> wrote in message
    news:...
    > Hi guys,
    >
    > I wrote a custom control. I added the properties "public Unit height;" and
    > "public Unit width;" to get the control sizeable. It works well. But how

    can
    > I get the Left and Top position of the control? If I add "public Unit

    Top;"
    > and "public Unit Left;" it doesn't work. If i moving the control in
    > designtime the properties will not be updated.
    >
    > I hope you understand my problem although my bad english.
    >
    >
    Alessandro Zifiglio, Dec 8, 2003
    #2
    1. Advertising

  3. hi Bjorn,
    I've been having that same problem and i've posted a solution some time
    back. You might want to read that first. If your still having problems,
    askaway ;P

    http://www.developersdex.com/asp/message.asp?p=2906&ID=<TH4xb.9539$i%5
    F5%2E1073%40news%2Eedisontel%2Ecom%3E

    "Björn Marthen" <> wrote in message
    news:...
    > Hi guys,
    >
    > I wrote a custom control. I added the properties "public Unit height;" and
    > "public Unit width;" to get the control sizeable. It works well. But how

    can
    > I get the Left and Top position of the control? If I add "public Unit

    Top;"
    > and "public Unit Left;" it doesn't work. If i moving the control in
    > designtime the properties will not be updated.
    >
    > I hope you understand my problem although my bad english.
    >
    >
    Alessandro Zifiglio, Dec 8, 2003
    #3
  4. Thanks, Style["LEFT"] and Style["TOP"] works fine.
    Björn Marthen, Dec 9, 2003
    #4
    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. Varangian

    Get the LEFT and TOP position of Image

    Varangian, Mar 30, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    480
    Varangian
    Mar 30, 2006
  2. Shawn B.

    Top and Left of "Control" Not "WebControl"

    Shawn B., Apr 29, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    116
    Shawn B.
    Apr 29, 2004
  3. Björn Marthen

    A Custom Control as a property of antoher Custrom Control

    Björn Marthen, Nov 6, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    96
    Björn Marthen
    Nov 6, 2003
  4. abicz

    SVG Web custrom control

    abicz, Apr 27, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    453
    Ken Cox [Microsoft MVP]
    Apr 27, 2004
  5. ENathan

    set top and left on web control?

    ENathan, May 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    176
    Mythran
    May 13, 2005
Loading...

Share This Page