Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Multiline analog for Textfield - Page 2 — Gideros Forum

Multiline analog for Textfield

2»

Comments

  • usage is as described in the sample left in this forum .. but if it helps .. here goes(for TextWrap):

    *****************************
    function Author:AuthorBio()
    local retval = Sprite.new()
    local font = TTFont.new("fonts/kaiu.ttf", 18)
    local authorBio = TextWrap.new(self.rowData[1]["bio"], 440, justify, 1, font)

    print("Authors Bio info is: "..self.rowData[1]["bio"])

    authorBio:setPosition(300,35)
    authorBio:setTextColor(0xffffff)

    retval:addChild(authorBio)

    return retval
    end
    *****************************

    Oddly enough a previous version of TextWrap (June 21, 2012 file) worked ok .. after removing any 'print's using 'getTime()' .. using this code
  • and the version of the function using TextWrap2:

    *************************
    function Author:AuthorBio()
    local retval = Sprite.new()
    local font = TTFont.new("fonts/kaiu.ttf", 18)
    local authorBio = TextWrap2.new(self.rowData[1]["bio"], 440, 600, 1, font)

    print("Authors Bio info is: "..self.rowData[1]["bio"])

    authorBio:setPosition(300,35)
    authorBio:setTextColor(0xffffff)

    retval:addChild(authorBio)

    return retval
    end
    *************************

    This one just doesn't display. No error indicators popup tho. And the print statement works fine.
  • I just got a TextWrap that works fine without modification from the Gideros Github .. hope its the latest version, there no indication of date.
    it works well, except for 'justify' is not aligning the text on both sides .. only the left.
Sign In or Register to comment.