corona


Display long text in fixed frame in Corona


so at the moment I have to do an assignment at school which requires me to create a Calculator for mobile devices using Corona, ive got the buttons and display classes to work.
In the display class, Ive created 2 frame (one to display the method and the others for result). The final result im looking for is something like a handheld graphical calculator's UI (Casio fx series..).
Which means you can type in a long and continuous method (the whole text will move toe the left and always show you the END of the method) as you press "=" the calculator will give you the result.
What I've got up to so far is that I created a frame which can fit 2 lines of text for displaying the method, but once you've filled up the frame with numbers, Corona will crop out the end of the string .
so what i'm going to do is by having 2 strings, the 1st one is the main one to store what the user type in (the whole method) I will select the last 10 characters from the main string and save it in the second string and display the second string.
So do you know if there's any code that i can use to select a number of characters from a string ?
You can use the built in LUA method
string.sub (yourString, startIndex , endIndex )
http://pgl.yoyo.org/luai/i/string.sub`

Related Links

Modifying display object property in Corona sSk
How to create a minimap in Corona SDK?
Display json data page wise in corona
After Inapp purshase touch action disabled in corona sdk?
How to parse JSON Data in Corona SDK [duplicate]
How to make an object change its look on collision with another object in corona sdk
Drop Down animation for Image on Tap
Sound is not working properly in Corona SDK
How can i properly align Arabic text using the Corona SDK?
Can we change physics body properties in runtime - corona sdk
How to slide pages in Corona SDK
Return Data on showwebpopup
How to pause game and display new layer in corona
Corona SDK pathToFile issue
How to integrate fortumo In-App purchase plugin to Corona Sdk game?
How to make the PNG's transparent region not be listened by the EventListener when a touch event happened?

Categories

HOME
google-chrome
oracle
entity-framework
bokeh
schema.org
selenium-builder
systemd
liferay-7
tfs2015
google-search-console
static-analysis
specifications
polymer-2.x
spring-security-oauth2
parsley.js
vimeo
buffer
ex
sql-injection
xbox360
orange-api
heap-dump
google-tasks-api
conda
stackexchange.redis
python-imageio
tortoisehg
guice
monitor
series
universal
knights-tour
restful-architecture
express-session
orchardcms-1.8
redgate
mv
elastica
text-decorations
sbjson
flowchart
hypothesis-test
pyttsx
word-cloud
xcode8.2
nothing
sharpdx
email-forwarding
lvalue
apache-modules
swiperefreshlayout
dynamics-crm-4
finder
pbx
bigdecimal
mathjs
clp
zynq
always-on-top
spring-mongo
jtag
apache-pig-grunt
sharepoint-apps
processor
jeasyui
mathnet
utf-16
gravatar
cortana
textpattern
html.actionlink
apple
embeddedwebserver
unidata
web-api
whitespace-language
nanomsg
operands
datagridcomboboxcolumn
adwords-apiv201402
berkeley-db-xml
coding-efficiency
windows-messages
jini
thruway
lsa
node.js-stream
pacman
unicoins
tfs-sdk
xmlwriter
instance-variables
struts2-s2hibernate
pcspim
netstream
mvcrecaptcha
haiku
datacontracts
qt-mobility
startupscript
kext
git-log
formal-semantics
chunking
tessellation
3-tier
getimagesize
ppc
3270
eai
tso
version-control-migration
webclient.uploaddata

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App