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

Physics editor and sprite sheets - corona
CoronaSDK- How to handle touch and tap at the same time
Using pubnub with corona sdk - basic configuration
Corona SDK - Scene being canceled when entering data into a txt
Corona SDK dynamic width objects
Fade text color in Corona SDK
How to maintain the ratio of distance between 2 moving objects in Corona SDK? [closed]
Corona SDK: show emoji/images on native.showAlert()
error when upload Build on app store in corona sdk
How to properly use store.* in conjunction with storyboard
How to set Corona notification big view
Set object or button above the video in corona sdk
selectively upgrade existing sqlite database in corona by comparing database versions
Corona Near Field Comunication (NFR)
How can i make random generated quotes
Using perspective library with Corona SDK

Categories

HOME
jboss
artificial-intelligence
powerbi
svn
opencart
tomcat
yaml
barcode-scanner
message-queue
stacktrace.js
adobe
histogram
mathematical-optimization
swift2
openfoam
fedora
phpmqtt
joomla3.2
sympy
kurento
tfs2010
mailing-list
lapack
orc
outlook-restapi
bundler
c#-7.0
tomcat8
android-contacts
raml
social-tables
gitkraken
yii2-basic-app
dashdb
fido-u2f
pymongo
substring
unrar
clipboard
django-import-export
tsung
social-networking
windowsiot
progid
netbios
sql-execution-plan
advanced-filter
serversocket
polyml
nppexec
netstat
nsuserdefaults
love2d
code-rally
iscroll
praat
grails3.2.0
word-cloud
httphandler
sendinput
permission-denied
daz3d
flume-twitter
liteide
return-type
photoswipe
knockout-2.0
google-news
popen
stateless-session-bean
adobe-reader
oracle-fusion-apps
boost-compute
cefpython
rational-performance-test
dcount
jpda
seccomp
callouts
msbuild-4.0
declarative
fiber
android-syncadapter
polymerfire
odesk
cryptojs
lowercase
astropy
mathematical-expressions
jolie
ildasm
relationships
full-text-indexing
android-2.3-gingerbread
windows-messages
screwturn
webaii
xmi
property-injection
jms-serializer
progress-db
mute
unrealscript
lru
ax
jquery-lazyload
towers-of-hanoi
sfinae
websphere-6.1
platform-independent
fitch-proofs
server-variables
data-dump
firefly-mv
nosetests
azure-acs
regression-testing
formal-semantics
mygeneration
android-input-method
resharper-5.0

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App