Le 04/06/15 10:37, Emmanuel Lécharny a écrit :
> Le 03/06/15 23:40, Emmanuel Lécharny a écrit :
>> Le 03/06/15 22:54, Stefan Seelmann a écrit :
>>> Hi Emmanuel,
>>>
>>> I played a bit with it, changed
>>>
>>> * new GridData( GridData.FILL_HORIZONTAL )
>>> * toolkit.createText( ldapLimitSectionComposite, "" , SWT.WRAP |
>>> SWT.MULTI );
>>>
>>> but nothing helped, I'm also clueless.
>> I'll see if using a GridData helps. Otherwise, I'll step through the
>> code to see what's going on (wish me good luck ;-)
>>
> Using GridData keeps the Sections' size correct. However, the Text
> itself grows up to a point I don't see what's at the end, but this is
> definitively better. Except that if I resize the window, then the
> section grows as it did with the TabWrapLayout.
>
> So it seems the key is to find the way to tune the Text widget so that
> it does not grow.
>
> And who said GUI development was for beginners ? ;-)
Ok, some workaround :

        // The olcSizeLimit parameter.
        toolkit.createLabel( ldapLimitSectionComposite,
            Messages.getString( "OpenLDAPTuningPage.SizeLimit" ) );
//$NON-NLS-1$
        sizeLimitText = toolkit.createText( ldapLimitSectionComposite, "" );
        GridData sizeLimitData= new GridData( SWT.FILL, SWT.NONE, false,
false, 2, 1 );
        sizeLimitData.horizontalAlignment = SWT.FILL;
        Rectangle rect =
sizeLimitText.getShell().getMonitor().getClientArea();
        sizeLimitData.widthHint = rect.width/8; 
<<-------------------------------------- This provides a hint about the
requested maximal size.
        sizeLimitText.setLayoutData(sizeLimitData );
        sizeLimitText.setEditable( false );

It's a kind of a hack, but it does the trick.

Now, I think I will change the screen to avoid exposing the
Size/TimeLimit. ENough to have a button that brings the user to the
associated Dialog.

Reply via email to