Results 1 to 13 of 13

Thread: Loop through groupbox controls.

  1. #1
    Join Date
    Oct 2006
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Loop through groupbox controls.

    Is it somehow possible to loop through the controls that are in a groupbox?

    I have 8 checkboxes, and I want to loop through each one of them. Anyone knows how to do it?

  2. #2
    Join Date
    Jun 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    For I:=0 to I:=8 do
    Begin
    CheckBox[1].something ?

  3. #3
    Join Date
    Oct 2006
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by I Soccer You View Post
    For I:=0 to I:=8 do
    Begin
    CheckBox[1].something ?
    I tried that, declared the checkboxes as an array, then renamed them, but didn't work =/

  4. #4
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Scar isn't capable of Multi Threading..

  5. #5
    Join Date
    Jun 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Show us the code?

  6. #6
    Join Date
    Oct 2006
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Scar isn't capable of Multi Threading..
    It's not multithreading I'm talking about.
    I just want to loop through the checkboxes when I have clicked the close button.

    Anyway, I did it with a list of If's now, so nevermind anymore.

  7. #7
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Oh sorry I thought when the form was running, my mistake.

  8. #8
    Join Date
    Jun 2008
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    jaja... dat zal vast wel ^^

  9. #9
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Pauwelke View Post
    Anyway, I did it with a list of If's now, so nevermind anymore.
    if i get what you mean then use case instead.

    You could declare them as an array of Tcheckbox. Then loop through. Easiest and fastest way. I personally find that working with arrays of components makes the updating and changing of a form, much easier.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  10. #10
    Join Date
    Jun 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by jaapbaardaap View Post
    jaja... dat zal vast wel ^^
    We only talk english out here,
    Quote Originally Posted by jaapbaardaap View Post
    sure sure....... that shall it be

  11. #11
    Join Date
    Oct 2006
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    if i get what you mean then use case instead.

    You could declare them as an array of Tcheckbox. Then loop through. Easiest and fastest way. I personally find that working with arrays of components makes the updating and changing of a form, much easier.
    I tried using an array but it gave me some errors.

    I might try again tomorrow, too tired at the moment.

  12. #12
    Join Date
    Jun 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SHOW us the damn code

  13. #13
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    If your form is confusing try using this, and make sure you use with statements.

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Who controls America?
    By kingarabian in forum Discussions & Debates
    Replies: 21
    Last Post: 07-25-2009, 03:16 PM
  2. What are the chr controls for SendKeys ?
    By Dervish in forum OSR Help
    Replies: 7
    Last Post: 12-20-2008, 10:53 PM
  3. Adding controls to tabs....
    By R0b0t1 in forum OSR Help
    Replies: 0
    Last Post: 08-07-2007, 04:14 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
  •