Simply setting min. width to width when an explicit width value is set is an interesting idea. However, any time an absolute width is specified, the min. width is going to be ignored: a width value that is not -1 and not relative is always respected. In other words, the min. width wouldn't even be consulted in this case - min. width really does only apply to a calculated size.

I can't think of a concise way to represent that in a property name, though - "minimumCalculatedWidth" isn't very clear. "minimumPreferredWidth" isn't accurate. I almost think that "minimumWidth" is the best option, though we'd have to document that it would be ignored if an absolute width was given. In either case, we should probably also provide a "maximumWidth" property for parity.

What do you think these properties should be called?

G


On Sep 16, 2009, at 7:57 PM, Scott Lanham wrote:

The only case that I can think of where minimum width and explicit width work together is when the column says "This is the size I want to be but if you do need to resize me you shouldn't squash me down to any more than the minimum". The bound check on that is just to make sure the minimum width is not greater then width. Should an exception be thrown in this case or just set minimum
width to width?

On Thu, 17 Sep 2009 09:41:33 am Greg Brown wrote:
I just mean checking an explicitly set width value (i.e. not -1 and
not relative) against min. width, and vice versa. Of course, if we
defined it as the "minumum automatically determined width" vs. a
literal minimum width, then we wouldn't have to do that.

I'm not sure what the best solution is - just throwing some ideas out.

On Sep 16, 2009, at 7:37 PM, Scott Lanham wrote:
I am happy to do more but I don't know what you mean by bounds
checking. I can
probably guess as to what the property change events should be.

On Thu, 17 Sep 2009 09:30:41 am Greg Brown wrote:
I like it. We'll need to do some bounds checking and fire property
change events, but it does seem like a useful feature. Want to take a
stab at rounding it out?

On Sep 16, 2009, at 7:13 PM, Scott Lanham wrote:
Hi,

Just another QADH ( Quick and Dirty Hack ). I don't expect this is
up to the
standard you guys like.

I was playing around with resizing a TableView that is within a
ScrollPane
that is within a SplitPane and realised that I didn't want relative
sized
column widths to shrink to nothing before the horizontal scroll bar
kicked in.
I also wanted to set a minimum width for auto sized column widths
(-1) so that
the header wasn't obscured.

What I did to implement this is attached.

Cheers,

Scott.
<pivot_svn_patch_20090917_01.diff>


Reply via email to