From: TWischmeier on 20 Apr 2010 04:37 Hi, I encountered a strange problem where setting button.Visible = true has no effect. I can successfully get and set some other properties. Even if I debug to the point where I set that value and do a quick watch (Ctrl + Al+ Q) and execute those following two lines manually: btn2.Visible = true btn2.Visible it shows btn2.Visible being false. There is another button next to this one where it works without a problem. I cannot think of any reason why this occurs, so I am glad for any help.
From: Paul G. Tobey [eMVP] paultobey _at_ earthlink _dot_ on 20 Apr 2010 12:13 From what thread are you doing this? If it's from another thread, I wouldn't be surprised if it didn't work. It's also possible that an event handler for the button is getting called when you change the visibility state and, in there, it's setting the state back to False. Those are the two things that occur to me, anyway. Paul T. "TWischmeier" wrote: > Hi, > > I encountered a strange problem where setting button.Visible = true > has no effect. I can successfully get and set some other properties. > > Even if I debug to the point where I set that value and do a quick > watch (Ctrl + Al+ Q) and execute those following two lines manually: > btn2.Visible = true > btn2.Visible > > it shows btn2.Visible being false. There is another button next to > this one where it works without a problem. I cannot think of any > reason why this occurs, so I am glad for any help. > . >
From: badzio on 26 Apr 2010 15:17 On 20 Kwi, 10:37, TWischmeier <tim.wischme...(a)googlemail.com> wrote: > Hi, > > I encountered a strange problem where setting button.Visible = true > has no effect. I can successfully get and set some other properties. Are you using standard controls or some 3rd party dll? Maybe btn.refresh() helps?
|
Pages: 1 Prev: XML web service and C# Next: NullReferenceException in bitmap constructor |