KintaRo Posted April 13, 2012 Share Posted April 13, 2012 Aşağıdaki kodu yazdığınız inputa sadece sayı girilmesine izin verir. Koşullandırmaları çoğaltarak , veya . girişine de izin verebilirsiniz: [code]local sText = Input.GetText(this) if String.ToNumber(String.Mid(sText, #sText, 1)) == 0 then if String.Mid(sText, #sText, 1) ~= "0" then Input.SetText(this, String.Mid(sText, 1, #sText-1)) end end[/code] Quote Link to comment Share on other sites More sharing options...
turkoglu98 Posted April 14, 2012 Share Posted April 14, 2012 hiçte dediğin gibi olmuyor arkadaşım 1 yazdıktan sonra 1 in sol tarafına istediğim kadar kelime yazabiliyorum Quote Link to comment Share on other sites More sharing options...
blackman12 Posted April 14, 2012 Share Posted April 14, 2012 Söylediğinde haklı olabilirsin ama o usluba dikkat etsen iyi olur! Neyse şöyle bişeyde ben yazdım: Global Functionsa: [quote]sText = ""[/quote] İnputun On_Key evresine: [code]if (e_Key < 58 and e_Key > 47) or (e_Key < 106 and e_Key > 95) then sText = Input.GetText(this) else Input.SetText(this, sText) end[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.