These properties used to be called "minimum/maximumPreferredWidth" and 
"minimum/maximumPreferredHeight". Their behavior is largely the same as it was 
in Pivot 1.5, except that constraints are now re-applied (for components that 
wrap) when these bounds are exceeded. Essentially, they place bounds on the 
value a component will report for preferred size. For example, I might have a 
button that, by default, wants to be 100 pixels wide. That is the button's 
"preferred width". However, if I set "minimumWidth" to 120, the button will 
report a preferred width of 120. If I set  "maximumWidth" to 80, the button 
will report a preferred width of 80. 

Components (and constrained visuals in general) support the notion of 
"constrained preferred size". That is, I can ask a component, "given this 
width, how tall would you like to be?" or "given this height, how wide would 
you like to be?". I can also ask the component "given no constraints, what size 
would you like to be?". The constrained methods are largely used to facilitate 
wrapping, either horizontally or vertically.

Does that help?

On Jun 25, 2010, at 8:52 AM, aappddeevv wrote:

> I've seen these changes and read the jira. I'm not sure I know what the
> guidance is on how to use min/max. Clearly preferred is out.
> 
> 
> 
> I thought preferred meant:  given a width or a height as input, tell me what
> the preferred height or width is. Or just tell me how big you would like me
> to be.
> 
> 
> 
> Min/max I understand individually. 
> 
> 
> 
> I am not sure how it tells me what size a client prefers to be given a
> width, height as input.
> 
> 
> 
> I have a ruler skin for line numbering and am not sure where to return its
> preferred width (space for the digits and a line).  Do I return this "width"
> both in the min and max width? Or just the min?
> 
> 
> 
> How do I ask a component the question, "given some space I have to display
> you, what size would you prefer to be?" Or is this the wrong question?
> 
> 
> 

Reply via email to