0 Members and 3 Guests are viewing this topic.
msg = ""function on.paint(gc) gc:drawString(msg,10,10,"top")endfunction on.charIn(ch) msg = msg .. ch platform.window:invalidate()end
Try to use the class D2Editor.[edit] sorry I missed jimbauwens's post.jimbauwens, what's wrong with it? The scrolling?
I am a proud cynic.
Levak: you mean you can't set the focus on it? A quick try with a single D2Editor on the screen gets the focus on nspire_emu.
function on.create() editor = D2Editor.newRichText() editor:move(50,50) editor:resize(200,100)end function on.charIn(char) currentText = editor:getText() editor:setText(currentText .. char) --Add char to the editorend function on.enterKey() on.charIn(string.char(10)) --Add a new lineendfunction on.tabKey() if focus then focus = false D2Editor.setFocus(false) else focus = true D2Editor.setFocus(false) endend
gc:drawString(Text,0,0,"top")