Display long text in fixed frame in Corona -


so @ moment have assignment @ school requires me create calculator mobile devices using corona, ive got buttons , display classes work.

in display class, ive created 2 frame (one display method , others result). final result im looking handheld graphical calculator's ui (casio fx series..).

which means can type in long , continuous method (the whole text move toe left , show end of method) press "=" calculator give result.

what i've got far created frame can fit 2 lines of text displaying method, once you've filled frame numbers, corona crop out end of string .


so i'm going having 2 strings, 1st 1 main 1 store user type in (the whole method) select last 10 characters main string , save in second string , display second string.

so know if there's code can use select number of characters string ?

you can use built in lua method

string.sub (yourstring, startindex , endindex )  

http://pgl.yoyo.org/luai/i/string.sub`


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -