|
-
Dec 17th, 2010, 03:37 AM
#1
Thread Starter
Lively Member
[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.
-
Dec 17th, 2010, 03:56 AM
#2
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!
-
Dec 17th, 2010, 04:01 AM
#3
Thread Starter
Lively Member
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.
-
Dec 17th, 2010, 04:06 AM
#4
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|