Thread: question about button.Text attributes

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    13

    question about button.Text attributes

    I have a forms application that I am writing but I am currently stuck on one section. I need to make buttons whose text field changes on button click.

    I have tried:

    button.Text="string";

    and

    this.button.Text="string";

    in both the button_Click and timer_Tick functions, is there anything else I need to include

    I am using C# 2.0 in Visual Studio 2005 with VS.NET (.NET SDK 2.0)

    anything would help, thanks
    Last edited by projektaquarius; 04-15-2008 at 10:50 PM. Reason: forgot something

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Assuming "button" is the name of the button then it should work, your error (whatever it is) lies elsewhere.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    13
    found where it was wrong. Kinda of wish I had known what was going on last weekend. Thanks a lot.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM