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

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


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
Site Team
iPwn's Avatar
Join Date: May 2010
Location: USA
Posts: 3,926
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,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:

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

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 06:28 PM.

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