[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.
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
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.
Re: Move Checkbox at Runtime
Works like a charm. Thanks buddy.