[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: Layout

Thanks a lot Evelyne,

I've coded your first idea and it is exactly what I want !

I've fixed L to be a FillLayout and it doesn't matter with the parameter 
(SWT.HORIZONTAL or VERTICAL)
A RowLayout with SWT.HORIZONTAL parameter doesn't look good...

In my opinion Layout are quite difficult to understand... I need to be used 
with them !

Thanks,
frank


"Evelyne Merle" <dummy@xxxxxxxx> a écrit dans le message de news: 
ekos04$bu6$1@xxxxxxxxxxxxxxxxxxxx
> First idea : If C1 and C2 are same height or same width, and can be 
> resized on user interaction
>
> Use a SashForm instead of composite for C. (take a look at setWeights for 
> objects ratios)
> To maximize C2, use SashForm method setMaximizedControl(C2)
> To return to initial state, use setMaximized(null)
>
> Second idea : C is managed by a GridLayout (=L)
> Use setLayoutData on C1 with GridData and exclude top set to true or false 
> depending on C1 visibility.
> When C1 visiblity is changed, set exclude top to the right value dans call 
> layout() on C.
> C1 will be excluded from the layout processing.
>
> By the way, which layout is currently under L ?
>
> Evelyne.
>
> "frank Buloup" <buloup@xxxxxxxxxxxxxxxx> a écrit dans le message de news: 
> ekoqqr$9ia$1@xxxxxxxxxxxxxxxxxxxx
>> Hi,
>>
>> Imagine you have two composite C1 and C2 in a parent composite C
>> with a layout L.
>>
>> C2 has a button with a mouse up listener. This listener is here to toggle 
>> visibility
>> of C1 and to ask L to redraw.
>>
>> But :
>> this redraw must force C2 to occupy the all client area of C if C1 
>> visibility
>> is false or to get previous state if C1 visibility is true.
>>
>> I have not been able to do that ! It seems to be easy but...
>>
>> any ideas ?
>>
>> thanks a lot,
>> regards
>> frank
>>
>>
>>
>
>