newbee easy question

Discussion in 'Questions (Windows Mobile)' started by sosimple, Dec 17, 2008.

  1. sosimple

    sosimple Member

    Hi. I am trying many hour to do this:
    I have this: mybutton.Left = mybutton.Left + 20 which
    works ok. I want to do the same but with a variable counter to do something like this:

    I have 10 buttons: mybutton1 .....mybutton10

    for counter =1 to 10

    mybutton( counter).Left = mybutton( counter).Left + 20

    next

    Of course this, doe snot work . How must i write it? I have try many ways, i cant find it.. Thanks ,
     
  2. taximania

    taximania Well-Known Member Licensed User

    for counter = 1 to 10
    Control("mybutton" & counter).Left= (your code goes here)
    next
     
  3. sosimple

    sosimple Member

    Thanks very much man, you dont know how many different thinks i have try..
    I almost have found it, i have wright
    Control(mybutton & counter).Left= ...
    but it wanted the "" .... Thanks again.
     
  4. klaus

    klaus Expert Licensed User

    I had sometimes the same experience as you. And me too, sometimes, I would have saved time in reading more carefully the help file.
    Basic4ppc - Main Help

    Best regards.
     
  5. specci48

    specci48 Well-Known Member Licensed User

    OT

    Off Topic: How would you express yourself if there would be no signature... ;)
     
  6. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice