Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsGridLayout: marginTop and marginBottom versus marginHeight
https://www.eclipse.org/forums/index.php/mv/msg/143334/451365/#msg_451365
marginTop, marginBottom, marginLeft and marginRight. But the pre-3.1
attributes marginHeight and marginWidth still exist.
How is marginHeight distinct from marginTop and marginBottom?
How is marginWidth distinct from marginLeft and marginRight?
Looking at the source, it appears that all six attributes take part in
layout calculations, but the interpretation of the different attributes is
not made clear from the javadoc. It appears that marginHeight is added to
both marginTop and marginBottom; and that marginWidth is added to both
marginLeft and marginRight. Why complicate matters this way?
Can anyone clarify why we use six attributes to specify four margins?]]>Rod Bailey2005-02-28T00:09:11-00:00Re: GridLayout: marginTop and marginBottom versus marginHeight
https://www.eclipse.org/forums/index.php/mv/msg/143334/451366/#msg_451366
I think they want to keep compatibility. In any case, this does not
hurt, and may be even good. If you want to have equal margins to left
and right, you can set just one property.
> Since 3.1 there have been four new attributes added to the GridLayout:
> marginTop, marginBottom, marginLeft and marginRight. But the pre-3.1
> attributes marginHeight and marginWidth still exist.
>
> How is marginHeight distinct from marginTop and marginBottom?
> How is marginWidth distinct from marginLeft and marginRight?
>
> Looking at the source, it appears that all six attributes take part in
> layout calculations, but the interpretation of the different attributes is
> not made clear from the javadoc. It appears that marginHeight is added to
> both marginTop and marginBottom; and that marginWidth is added to both
> marginLeft and marginRight. Why complicate matters this way?
>
> Can anyone clarify why we use six attributes to specify four margins?
>
>
--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)]]>Konstantin Scheglov2005-02-28T06:09:53-00:00Re: GridLayout: marginTop and marginBottom versus marginHeight
https://www.eclipse.org/forums/index.php/mv/msg/143334/451379/#msg_451379
different sized margins on one side versus the other. In general
marginWidth and marginHeight are sufficient because you want the same margin
on both sides.
If you have both marginWidth and marginLeft set, then teh result will be the
sum of the two values:
"Konstantin Scheglov" <scheglov_ke@nlmk.ru> wrote in message
news:A9lrewVHFHA.704@fairy.ao.nlmk...
> Rod Bailey:
>
> I think they want to keep compatibility. In any case, this does not
> hurt, and may be even good. If you want to have equal margins to left and
> right, you can set just one property.
>
>> Since 3.1 there have been four new attributes added to the GridLayout:
>> marginTop, marginBottom, marginLeft and marginRight. But the pre-3.1
>> attributes marginHeight and marginWidth still exist.
>>
>> How is marginHeight distinct from marginTop and marginBottom?
>> How is marginWidth distinct from marginLeft and marginRight?
>>
>> Looking at the source, it appears that all six attributes take part in
>> layout calculations, but the interpretation of the different attributes
>> is
>> not made clear from the javadoc. It appears that marginHeight is added to
>> both marginTop and marginBottom; and that marginWidth is added to both
>> marginLeft and marginRight. Why complicate matters this way?
>>
>> Can anyone clarify why we use six attributes to specify four margins?
>>
>>
>
>
> --
> SY, Konstantin.
> Advanced Eclipse SWT Designer (http://www.swt-designer.com)]]>Veronika Irvine2005-02-28T19:09:28-00:00Re: GridLayout: marginTop and marginBottom versus marginHeight
https://www.eclipse.org/forums/index.php/mv/msg/143334/451380/#msg_451380
example isn't really needed - left me know if it is.
"Veronika Irvine" <veronika_irvine@oti.com> wrote in message
news:cvvq9h$aj5$1@www.eclipse.org...
> margintop, marginBottom, margin Left and marginRight are used when you
> want different sized margins on one side versus the other. In general
> marginWidth and marginHeight are sufficient because you want the same
> margin on both sides.
>
> If you have both marginWidth and marginLeft set, then teh result will be
> the sum of the two values:
>
>
> marginLeft = 2;
> marginRight = 4;
> marginTop = 6;
> marginBottom = 8;
> marginLeft = marginHeight = 0;
>
>
> -----------------------------------------
> | | | |
> | | | |
> | | | |
> | | | ||
> |
> |
> |
> |
> |
> |
> |
> |
> |
> |
> ----------------------------------------
>
> "Konstantin Scheglov" <scheglov_ke@nlmk.ru> wrote in message
> news:A9lrewVHFHA.704@fairy.ao.nlmk...
>> Rod Bailey:
>>
>> I think they want to keep compatibility. In any case, this does not
>> hurt, and may be even good. If you want to have equal margins to left and
>> right, you can set just one property.
>>
>>> Since 3.1 there have been four new attributes added to the GridLayout:
>>> marginTop, marginBottom, marginLeft and marginRight. But the pre-3.1
>>> attributes marginHeight and marginWidth still exist.
>>>
>>> How is marginHeight distinct from marginTop and marginBottom?
>>> How is marginWidth distinct from marginLeft and marginRight?
>>>
>>> Looking at the source, it appears that all six attributes take part in
>>> layout calculations, but the interpretation of the different attributes
>>> is
>>> not made clear from the javadoc. It appears that marginHeight is added
>>> to
>>> both marginTop and marginBottom; and that marginWidth is added to both
>>> marginLeft and marginRight. Why complicate matters this way?
>>>
>>> Can anyone clarify why we use six attributes to specify four margins?
>>>
>>>
>>
>>
>> --
>> SY, Konstantin.
>> Advanced Eclipse SWT Designer (http://www.swt-designer.com)
>
>]]>Veronika Irvine2005-02-28T19:11:04-00:00