Page 1 of 1

PostPosted: Mon Feb 20, 2006 5:28 pm
by tthkbw
I thought this might be useful for my project, so I added it and put an instance of it on a form.

Problem is, I can't figure out how to make it useful. I want to make the control (the gadget) visible only when I am using it to show progress, but the .visible attribute creates a compile time error when I try to access it.

Anyone know how to hide and show the control on a form?

Terry Brown

PostPosted: Tue Feb 21, 2006 3:23 am
by dewey
You can only set the visible property, you cannot read it.

PostPosted: Tue Feb 21, 2006 12:52 pm
by tthkbw
The real problem was that you need to expose the visible property from the gadget with a method that allows access. When I did this:

mygadget.visible = false;

I got the compile time error.

In the gadget definition I did this:

void ProjectBarGadget.isvisible (bool value) {
gadget.visible = value;

And now I can do:


And it worked. Originally I thought this, but I struggled with the definition of the method--finally got it right, though.

Terry Brown