Please test the following code:
Code: Select all
SetFont(#SANS, 18, {Engine=#FONTENGINE_INBUILT})
TestText$="Test Text"
TestNum=9
Delta=-1
Function p_TestFunc()
TestNum=TestNum+Delta
If TestNum=5 Or TestNum=9 Then Delta=-Delta
Length=TextWidth(LeftStr(TestText$, TestNum))
DebugPrint(LeftStr(TestText$, TestNum), Length)
EndFunction
InstallEventHandler({OnMouseUp=p_TestFunc})
Repeat
WaitEvent
Forever
Code: Select all
Test Tex 56 <---
Test Te 49 <---
Test T 42
Test 33
Test T 42
Test Te 51 <---
Test Tex 58 <---
Any ideas?