GIDForums  

Go Back   GIDForums > Computer Programming Forums > .NET Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 19-May-2005, 08:00
richiemac richiemac is offline
New Member
 
Join Date: May 2005
Posts: 16
richiemac is on a distinguished road

TextBox->RefreshText () method???


Hello again,

so here I am once again - in need of guidance. I've got my textboxes working how I want them but I'm having trouble resetting them to their default values. I'm using,

CPP / C++ / C Code:
private: System::Void reset_button_Click(System::Object *  sender, System::EventArgs *  e)
{
	myTextBox->ResetText ();
}

but all that this does is clear the textbox not reset it. I was of the impression that this was the method I needed to use for my task so why does it not work?? Am I using it wrong?
  #2  
Old 20-May-2005, 05:37
richiemac richiemac is offline
New Member
 
Join Date: May 2005
Posts: 16
richiemac is on a distinguished road

Sorry that should be...TextBox->ResetText () method


Sorry that should be...TextBox->ResetText () method
  #3  
Old 22-May-2005, 14:26
LuciWiz's Avatar
LuciWiz LuciWiz is offline
Moderator
 
Join Date: Jul 2004
Location: Cluj-Napoca (Romania)
Posts: 961
LuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the rough
ResetText is inherited from the Control class. It will indeed reset the text in the textbox to the default value. But the default value is an empty string, and I don't know of any way to change it (I really searched for it).
In conclusion, I don't think its functionality is the one you need. Just write your own Reset method and have a private string member defaultValue, which you can set at any time using another method, SetDefaultText(string defaultText).

It's the best I could come up with

Best regards,
Lucian
__________________
Please read these Guidelines before posting on the forum

"A person who never made a mistake never tried anything new."
Einstein
  #4  
Old 23-May-2005, 03:29
richiemac richiemac is offline
New Member
 
Join Date: May 2005
Posts: 16
richiemac is on a distinguished road
Thanks Lucian

I can't find anything on changing it either. I'll have to do it the hard way and write it myself.
 
 

Recent GIDBlogStupid Management Policies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking textbox data is numeric!! richiemac .NET Forum 6 19-May-2005 07:54
I have to use an other method ? C05MIN MySQL / PHP Forum 1 26-Jan-2005 11:16
calling abstract base class method calls draw instead achoo FLTK Forum 1 19-Dec-2004 10:38
regarding main method jerry C++ Forum 18 09-Mar-2004 19:48
Best method to get listed on Google no1special_1999 Search Engine Optimization Forum 4 24-Sep-2003 00:34

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 07:49.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.