Windows Component Location Help

Discussion in 'Programming General' started by ionide, Jan 2, 2009.

Windows Component Location Help
  1. Unread #1 - Jan 2, 2009 at 1:31 AM
  2. ionide
    Joined:
    Sep 26, 2008
    Posts:
    20
    Referrals:
    0
    Sythe Gold:
    0

    ionide Newcomer

    Windows Component Location Help

    Hello, i am wondering if anyone knows how to sort of animate component movements, such as making a button slide to the right side of the form.

    I tried a timer with

    button1.location.x = button1.location.x +10

    it seems simple, but i cannot figure it out, if anyone could help, let me know.

    thanks,
    -ionide
     
  3. Unread #2 - Jan 2, 2009 at 8:37 PM
  4. Flaming Idiots
    Joined:
    Dec 22, 2005
    Posts:
    235
    Referrals:
    1
    Sythe Gold:
    0
    Two Factor Authentication User

    Flaming Idiots Active Member
    Visual Basic Programmers

    Windows Component Location Help

    The location property is immutable. To move the button, you can just add to the Left property like below.

    Button1.Left += 10
    or
    Button1.Location += New Point(10, 0)
     
  5. Unread #3 - Jan 3, 2009 at 8:17 PM
  6. ionide
    Joined:
    Sep 26, 2008
    Posts:
    20
    Referrals:
    0
    Sythe Gold:
    0

    ionide Newcomer

    Windows Component Location Help


    Thanks, i figured this out right before i checked this post, thanks for the reply :D
     
< I need an intro to pascal | C version of Guido Landi's discovery. >

Users viewing this thread
1 guest


 
 
Adblock breaks this site