Announcement

Collapse
No announcement yet.

Display dynamic number of textboxes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Display dynamic number of textboxes

    I need to display a number of textboxes with their labels (contained in multidimensional array). I can not figure out how to get around the constant variable in the ADD CONTROL TEXTBOX statement. I want to use a FOR..NEXT looping for the number of variables and then display them on the screen for editing, but the because of the constant Windows control number or equates, I can't figure out the coding for it to be dynamic.

    Any help will be very helpful!

  • #2
    Originally posted by Eric Folbrecht View Post
    I need to display a number of textboxes with their labels
    Code:
            case %wm_initdialog
                for i = 1 to 10
                     control add label, cb.hndl, %IDC_LABEL1 + i, "Label" + format$(i), 48, (i-1)*12, 92, 12
                next

    Comment


    • #3
      Thanks Chris! I spent way too long trying to figure this out and you saved the day.

      Comment


      • #4
        Same principle....includes reading controls as well as writing ...
        http://www.powerbasic.com/support/pb...4&postcount=11
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment

        Working...
        X