Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
QuestionCan't change a button't text at runtime anymore?????? Pin
fiaolle24-Jan-12 9:28
fiaolle24-Jan-12 9:28 
AnswerRe: Can't change a button't text at runtime anymore?????? Pin
fjdiewornncalwe24-Jan-12 9:56
professionalfjdiewornncalwe24-Jan-12 9:56 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
fiaolle24-Jan-12 20:29
fiaolle24-Jan-12 20:29 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
lukeer24-Jan-12 21:15
lukeer24-Jan-12 21:15 
AnswerRe: Can't change a button't text at runtime anymore?????? Pin
OriginalGriff24-Jan-12 22:21
mveOriginalGriff24-Jan-12 22:21 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
fiaolle24-Jan-12 22:42
fiaolle24-Jan-12 22:42 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
OriginalGriff24-Jan-12 22:55
mveOriginalGriff24-Jan-12 22:55 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
fiaolle24-Jan-12 23:35
fiaolle24-Jan-12 23:35 
Hi I can't see any difference.

Here is my code.
C#
private void btn_Click(object sender, EventArgs e)
{
        if (folder.Visible==true )
        {
           btn.Text = "Hi"; 
         }         
         else
         {
            btn.Text = "By";
         }
}


The variable folder is just a bool variable. When I debug my code I can see that it runs as it should, but still the button's Text doesn't change.
I don't know if it has anything to do with the problem, but I have a FileLListbox and a FolderListBox from Alva on the form. Should that be the problem.

Many Thanks
Fia
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
OriginalGriff24-Jan-12 23:37
mveOriginalGriff24-Jan-12 23:37 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
fiaolle25-Jan-12 0:05
fiaolle25-Jan-12 0:05 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
OriginalGriff25-Jan-12 0:19
mveOriginalGriff25-Jan-12 0:19 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
fiaolle25-Jan-12 0:28
fiaolle25-Jan-12 0:28 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
OriginalGriff25-Jan-12 0:32
mveOriginalGriff25-Jan-12 0:32 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
Pete O'Hanlon25-Jan-12 3:41
mvePete O'Hanlon25-Jan-12 3:41 
AnswerRe: Can't change a button't text at runtime anymore?????? Pin
KP Lee24-Jan-12 12:02
KP Lee24-Jan-12 12:02 
AnswerRe: Can't change a button't text at runtime anymore?????? Pin
OOPSEP25-Jan-12 1:15
OOPSEP25-Jan-12 1:15 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
fiaolle25-Jan-12 2:30
fiaolle25-Jan-12 2:30 
AnswerRe: Can't change a button't text at runtime anymore?????? Pin
BillWoodruff25-Jan-12 3:41
professionalBillWoodruff25-Jan-12 3:41 
GeneralRe: Can't change a button't text at runtime anymore?????? Pin
fiaolle25-Jan-12 4:17
fiaolle25-Jan-12 4:17 
QuestionLearning C# custom controls Pin
thechazm24-Jan-12 5:53
thechazm24-Jan-12 5:53 
AnswerRe: Learning C# custom controls Pin
fjdiewornncalwe24-Jan-12 9:11
professionalfjdiewornncalwe24-Jan-12 9:11 
AnswerRe: Learning C# custom controls Pin
Dean Oliver24-Jan-12 19:00
Dean Oliver24-Jan-12 19:00 
AnswerRe: Learning C# custom controls Pin
BillWoodruff25-Jan-12 3:49
professionalBillWoodruff25-Jan-12 3:49 
GeneralRe: Learning C# custom controls Pin
thechazm25-Jan-12 9:04
thechazm25-Jan-12 9:04 
Questionhelp with array of buttons Pin
goldsoft24-Jan-12 2:51
goldsoft24-Jan-12 2:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.