Change background image
  1. What's up? I see you're viewing as a Guest. How about registering, it only takes like 2 minutes. This will enable you to do more on our forum and stay updated.

Buttons: Create labels or different text

Discussion in 'Developer General' started by Nuke547, Jun 30, 2011.

Thread Status:
This thread is more than 180 days old.
  1. Nuke547

    Nuke547 Junior Member Member

    This is a simple tutorial on how to make a visual studios program that changes a label/button's text, when you click another button.

    The first thing you want to do, is make 2 buttons, and a label.

    [​IMG]

    Now double click the first button and type this code in:
    To make the label change text, you would use this:
    Code:
    label1.text = "Your Text"
    To make the button change text, you would do this:
    Code:
    button2.text = "Your Text"
    If you want to make the label turn from invisible to visible, you would do this:

    First, in the design, you would go on the properties of the label, and change visible to false.

    [​IMG]

    Once you have this, double click the first button, and type the following:

    Code:
    label1.visible = true
    label1.text = "Your Text"
    
    Now you can debug your program, and your label/button will be changed!
  2. Jok3r

    Jok3r MC-Admin/Summoner Member

    Looks good Ill be sure to try this out later! :D
  3. Crazy52

    Crazy52 Gate Keeper Admin

    You can also just make 1 button, 1 label, and 1 text box

    Under button 1 put

    label1.text = textbox1.text


    Sent from my ADR6300
  4. ArSkHelios

    ArSkHelios New Member Member

    Or you can just use the properties on the right or left or wherever you have it set and change it there.. Lol
Thread Status:
This thread is more than 180 days old.

Share This Page