none
Draw Bound Text - Array[1 to ...] RRS feed

  • Question

  • Hey guys!

    I would like to write all 222 of an array in a bound text of a Graphic Window. But it wont work... That's my current code:

    'Absatz is the variable for the character code "10"
    
    For Kcount = 1 to KontoNum
         GraphicsWindow.FontBold = "True"
         GraphicsWindow.FontSize = 14
         GraphicsWindow.BrushColor = Colour[1]
         GraphicsWindow.DrawBoundText(10, 10, gw[1]-20, Knum[Kcount][Lang] + "  " + Konto[Kcount][Lang] + Absatz)
      EndFor

    It only writes the first variable...

    That's my variables:

      Knum[1]["De"] = "0330"
      Knum[1]["En"] = "0330"
      Knum[2]["De"] = "0340"
      Knum[2]["En"] = "0340"
      
      Konto[1]["De"] = "Betriebs- und Geschäftsausstattung"
      Konto[1]["En"] = "Betriebs- und Geschäftsausstattung"
      Konto[2]["De"] = "Fuhrpark"
      Konto[2]["En"] = "Fuhrpark"
      
      KontoNum = 1 'Immer die aktuelle Zahl eintragen Konto[?]...

    Anyone has an idea how to fix this?


    Greetings Timo

    Monday, December 3, 2012 1:31 PM

Answers

  • Timo,

    When you set KontoNum to 1 the loop is only executed once!


    Jan [ WhTurner ] The Netherlands

    • Marked as answer by Timo Sö Monday, December 3, 2012 6:13 PM
    Monday, December 3, 2012 2:16 PM
    Answerer
  • You draw the text on coordinates 10,10 . You have to change the y-coordinate for each Kcount e.g.

    50*Kcount-40 . See the explanation for DrawBoundYext.

     

    Jan [ WhTurner ] The Netherlands

    • Marked as answer by Timo Sö Monday, December 3, 2012 6:12 PM
    Monday, December 3, 2012 5:57 PM
    Answerer

All replies

  • Timo,

    When you set KontoNum to 1 the loop is only executed once!


    Jan [ WhTurner ] The Netherlands

    • Marked as answer by Timo Sö Monday, December 3, 2012 6:13 PM
    Monday, December 3, 2012 2:16 PM
    Answerer
  • Oh my bad. Thanks. :)

    But now there is a problem with the "+Absatz" part. There is no "Absatz" between the first and the second array.... Any idea how to fix this?


    Greetings Timo

    Monday, December 3, 2012 4:44 PM
  • You draw the text on coordinates 10,10 . You have to change the y-coordinate for each Kcount e.g.

    50*Kcount-40 . See the explanation for DrawBoundYext.

     

    Jan [ WhTurner ] The Netherlands

    • Marked as answer by Timo Sö Monday, December 3, 2012 6:12 PM
    Monday, December 3, 2012 5:57 PM
    Answerer
  • Ah thanks. I forgot this....

    You saved my day. :)


    Greetings Timo

    Monday, December 3, 2012 6:12 PM
  • To know how many elements are stored in an array, you can use Array.GetItemCount():

    kontoNum = Array.GetItemCount(konto)


    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

    Monday, December 3, 2012 6:42 PM
    Answerer
  • Thanks GoToLoop. :)

    Greetings Timo

    Tuesday, December 4, 2012 12:45 PM