1
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

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);
}
| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.