From: TWischmeier on
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
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
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?