Results 1 to 4 of 4

Thread: [RESOLVED] Move Checkbox at Runtime

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    124

    Resolved [RESOLVED] Move Checkbox at Runtime

    Hello Everyone.

    Can somebody help me code out array of checkboxes to move during runtime, fitting in the table in a listview.

    Right now, I have 5 columns, 30 items. Which means there's 5 checkbox per item in a listview. I have 150 control array checkboxes. From Check1(0) to Check1(149).

    All i got is this i don't know what to put next.


    Code:
    Dim leftcor As Long
    
    leftcor = 7000
    
    For y = 0 To 149
            Check1(y).Move leftcor, 1650, 200, 200
            leftcor = leftcor + 1000
    Next y
    That code move the checkboxes in a single line. What i want to do is after 5 checkboxes it will move down.

    Thanks in advance.

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: Move Checkbox at Runtime

    What the heck do you do with 150 Checkboxes?
    I'd reconsider the approach, in order to show only the needed ones!

    Code:
    Dim leftcor As Long
    dim topcor As Long
    leftcor = 7000
    topcor=1650
    Count=0
    For y = 0 To 149
    
            Check1(y).Move leftcor, topcor, 200, 200
            Count=count+1
            leftcor = leftcor + 1000
           If Count=5 Then
                leftcor=7000
                topcor=topcor+300'or plus whatever you need to make a new line
                Count=0
           End If
    Next y
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    124

    Re: Move Checkbox at Runtime

    It's like a table for Evaluation. I'm making a quiz/test application.

    Anyway, thanks let me try it.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    124

    Re: Move Checkbox at Runtime

    Works like a charm. Thanks buddy.

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