|Re: How to set a composite which is layouted by GridLayout totally invisible? [message #1718194 is a reply to message #1715507]
||Mon, 21 December 2015 08:34
You misunderstand what I mean.
There are two (a, b) composites put on a base (A) composite and set the
composite a to fill horizontal and composite b to fill both.
If I set composite a to be invisible and call layout() of A, you will find
composite a to be invisible, however, it still occupied the space.
The composite b does not really fill all the space of the A composite. But I
want it (this means b) to do so, since composite a is invisible and it (this
means a) should not occupied it's space anymore.
After tracing the source code of GridLayout in SWT, I found it use
composite.getChildren() to get all children.
So I copy the source code of GridLayout and GridData to my named space, and
modified it to get visible children only, finally it solved my problem.
Why SWT get all children of composite to layout?
Why doesn't it take off the invisible ones?
Any other ways to solve my problem instead of copy classes to my named space
and modify the source code?
Frank, using SWT 4604
"Niraj Modi" <forums-noreply@xxxxxxxx> 写入消息
> Try making a Control transparent using below method call:
> Refer usage of SWT.COLOR_TRANSPARENT in below example:
Powered by FUDForum
. Page generated in 0.02034 seconds