Problem with isTransparent for a container view ib the VC

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with isTransparent for a container view ib the VC

John Trinder
I open the VC on presenter Shell. I set backcolor to some colour so
that it is plainly visible. I then drop a ContainerView onto the
ShellView and set it's isTransparent property to true.

When I show the Shell, the container view is still plainly visible.

What am I doing wrong?


Reply | Threaded
Open this post in threaded view
|

Re: Problem with isTransparent for a container view ib the VC

Ian Bartholomew-19
John,

> When I show the Shell, the container view is still plainly visible.
>
> What am I doing wrong?

Bill posted a solution to this a little earlier (31 March 1998).  As a demo

Create a ContainerView subclass called TransparentContainerView.
Go to Presenter and add a new view and mutate the view' class to
TransparentContainerView.
Set it's #isTransparent aspect to false.
Save it as "Presenter.Transparent container view"

If you test again using a Presenter.Transparent container view in place of
the normal Presenter.Default view and you will see ....... no change :-)

Now add one method to TransparentContainerView

onEraseRequired: aColorEvent
    ^false

and when you test again the backcolor should show through.

I'll let you work out why it works yourself (i.e. I don't know :-) )

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Problem with isTransparent for a container view ib the VC

John Trinder
In reply to this post by John Trinder
About 4 years ago, Bill Schwab got round this. Subclass ContainerView
to, say, ContainerViewTransp, over-ride

#onEraseRequired:

^false

I've done this and it does work, although if a composite is being made
inside the container view, their positioning properties with
FramingConstraints may need to be fiddled with.


Reply | Threaded
Open this post in threaded view
|

Re: Problem with isTransparent for a container view ib the VC

Ian Bartholomew-19
In reply to this post by Ian Bartholomew-19
> Set it's #isTransparent aspect to false.

I'm sure I typed true - I meant to anyway :-)

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.