Results 1 to 3 of 3

Thread: [resolved] Dyanmic Control Array - positioning new elements

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Location
    Albany, NY
    Posts
    489

    [resolved] Dyanmic Control Array - positioning new elements

    The code works for the first new element of Cards() but not
    for the second or third. It seems to create new elements and
    place them on top of one another. I'm not sure why it would
    do this.......

    All I want if for the new Card(x) to be 200 twips to the left
    of the previous card. Any suggestions are appreciated.

    VB Code:
    1. Private Sub CreateNewcard()
    2.  
    3.     Load Cards(Cards.UBound + 1)
    4.     MsgBox Cards.UBound
    5.  
    6.     With Cards(Cards.UBound)
    7.         .Container = Cards(Cards.UBound - 1).Container
    8.         .Top = Cards(Cards.UBound - 1).Top
    9.         .Left = Cards(Cards.UBound - 1) + Cards(Cards.UBound - 1).Width + 200
    10.         .Height = Cards(Cards.UBound - 1).Height
    11.         .Width = Cards(Cards.UBound - 1).Width
    12.         .BackStyle = Cards(Cards.UBound - 1).BackStyle
    13.         .BackColor = Cards(Cards.UBound - 1).BackColor
    14.         .Shape = Cards(Cards.UBound - 1).Shape
    15.         .Visible = True
    16.     End With
    17.  
    18. End Sub
    Last edited by jcfowl; Aug 26th, 2003 at 08:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width