Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 12-07-2011, 04: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, 11:09 AM   #2
Site Team
iPwn's Avatar
Join Date: May 2010
Location: USA
Posts: 3,671
Default Re: counting characters in textbox

What language is this being programmed in?

Humans are the only creatures that won't live up to the their potential. Give everything your all. When you die, die on E.

So I ask you, what do you intend to do now?
iPwn is offline   Reply With Quote
Old 12-29-2011, 09:35 AM   #3
Site Team
berry120's Avatar
Join Date: Jul 2009
Location: England, UK
Posts: 3,422
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 11:35 AM.

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