# What precisely does dlgStretch do in Eagle PCB?

The manual of ULP says that this command "Defines an empty stretchable space in a box layout context". It gives the below trivial example:

   dlgHBoxLayout {
dlgStretch(1);
dlgPushButton("+OK")    { dlgAccept(); };
dlgPushButton("Cancel") { dlgReject(); };
}


This would be used as part of a bigger script containing dlgDialog. The thing is that changing the value of the parameter passed to this function makes no different at all. I am confused what this function is supposed to be used for.

The stretch factor does not matter when there is only a single space.

For multiple stretchable spaces, the factor specifies how much of the available space is allocated to each space object.

Try something like this:

dlgHBoxLayout {
dlgStretch(1);
dlgPushButton("+OK")    { dlgAccept(); };
dlgStretch(2);
dlgPushButton("Cancel") { dlgReject(); };
dlgStretch(3);
}