Click Here to Login
Join Computer forums Today


View Single Post
Old 12-29-2011, 10:35 AM   #3
berry120
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,434
Default Re: counting characters in textbox

Obviously as above this hugely depends on the language, but you can usually get the text in the textbox as a string and subsequently find out the length of the text.

So in Java for instance it'd be something like:

Code:
int remaining = 1000-textBox.getText().length();
countTextBox.setText(Integer.toString(remaining));
Translate to language of your choice!
__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
 

All times are GMT -5. The time now is 09:43 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
×