PC Review


Reply
Thread Tools Rate Thread

Button.Visible = true has no effect

 
 
TWischmeier
Guest
Posts: n/a
 
      20th Apr 2010
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.
 
Reply With Quote
 
 
 
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      20th Apr 2010
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.
> .
>

 
Reply With Quote
 
badzio
Guest
Posts: n/a
 
      26th Apr 2010
On 20 Kwi, 10:37, TWischmeier <tim.wischme...@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?
 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching Panels using Visible =true & Visible=false; Kristof Taveirne Microsoft Dot NET Compact Framework 1 28th Jun 2006 03:50 PM
Switching Panels using Visible =true & Visible=false; Kristof Taveirne Microsoft C# .NET 2 28th Jun 2006 01:47 PM
Panel.Visible = True also make child controls visible. spamfurnace Microsoft ASP .NET 1 24th May 2004 04:07 AM
Visible = False / Visible = True Question david Microsoft Access Form Coding 0 14th Apr 2004 08:48 PM
Re: Visible = False / Visible = True Question Dirk Goldgar Microsoft Access Form Coding 0 14th Apr 2004 07:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:47 PM.