Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 12-07-2011, 05:14 AM   #1
Solid State Member
 
Join Date: Oct 2011
Posts: 17
Default counting characters in textbox

hello

i have a text box and it has a text "1000"

and i also have a textbox 2 and i want the 1000 to be deminished whenever i typed in textbox 2 so that i can see how many characters i have typed in textbox 2


please help me!
__________________

lanche26 is offline   Reply With Quote
Old 12-26-2011, 12:09 PM   #2
..m.0,0.m..
Site Team
 
iPwn's Avatar
 
Join Date: May 2010
Location: USA
Posts: 3,870
Default Re: counting characters in textbox

What language is this being programmed in?
__________________

__________________
Me: You'd think as the dominant species we wouldn't be so effing stupid.
J: We're just intelligent enough to be completely effing stupid.
iPwn is offline   Reply With Quote
Old 12-29-2011, 10:35 AM   #3
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
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
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 05:18 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0