<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Controls: autoSize</title>
	<atom:link href="http://fxexperience.com/2009/07/controls-autosize/feed/" rel="self" type="application/rss+xml" />
	<link>http://fxexperience.com/2009/07/controls-autosize/</link>
	<description>Sharing the Experience of JavaFX</description>
	<lastBuildDate>Sat, 04 Feb 2012 00:40:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: JavaFX &#8211; Use Layout! &#171; Rakesh Menon</title>
		<link>http://fxexperience.com/2009/07/controls-autosize/comment-page-1/#comment-2601</link>
		<dc:creator>JavaFX &#8211; Use Layout! &#171; Rakesh Menon</dc:creator>
		<pubDate>Sat, 09 Jan 2010 04:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://fxexperience.com/?p=119#comment-2601</guid>
		<description>[...] as mentioned in my previous blog. You may also be interested in related discussion happening at fxexperience.com and more layouts from [...]</description>
		<content:encoded><![CDATA[<p>[...] as mentioned in my previous blog. You may also be interested in related discussion happening at fxexperience.com and more layouts from [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amy Fowler</title>
		<link>http://fxexperience.com/2009/07/controls-autosize/comment-page-1/#comment-68</link>
		<dc:creator>Amy Fowler</dc:creator>
		<pubDate>Tue, 14 Jul 2009 05:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://fxexperience.com/?p=119#comment-68</guid>
		<description>And there is the inverse issue:

When the app sets the width/height of a control and places it in a container, which promptly resizes it to its preferred size.   Turns out this is by-design and the supported way of handling this is to override the control&#039;s preferred size like this:

         layoutInfo: LayoutInfo { width: myWidth height: myHeight }

However, this is not necessarily intuitive and I have a number of JIRA issues filed because developers were surprised that their width/height settings were lost when the control was placed in a container (e.g. hbox/vbox).   I haven&#039;t closed the issues as &quot;will not fix&quot; until time convinces me developers just need to learn this idiom.</description>
		<content:encoded><![CDATA[<p>And there is the inverse issue:</p>
<p>When the app sets the width/height of a control and places it in a container, which promptly resizes it to its preferred size.   Turns out this is by-design and the supported way of handling this is to override the control&#8217;s preferred size like this:</p>
<p>         layoutInfo: LayoutInfo { width: myWidth height: myHeight }</p>
<p>However, this is not necessarily intuitive and I have a number of JIRA issues filed because developers were surprised that their width/height settings were lost when the control was placed in a container (e.g. hbox/vbox).   I haven&#8217;t closed the issues as &#8220;will not fix&#8221; until time convinces me developers just need to learn this idiom.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Chin</title>
		<link>http://fxexperience.com/2009/07/controls-autosize/comment-page-1/#comment-67</link>
		<dc:creator>Stephen Chin</dc:creator>
		<pubDate>Mon, 13 Jul 2009 10:54:34 +0000</pubDate>
		<guid isPermaLink="false">http://fxexperience.com/?p=119#comment-67</guid>
		<description>How about rather than introducing a new variable you make use of the existing LayoutInfoBase.managed variable.  According to the API docs, this variable &quot;Defines whether the node(s) referencing this layout info should have their layout managed by their parent container.&quot;

This could also be interpreted as having the size self-managed by the control if it is set to false.

Some other reasons why this conveniently works out include:
* It defaults to true (which is exactly what you wanted for your autoSize proposal)
* It resizes the component properly in the non-managed Container case
* It works with other UI elements that are not Controls (e.g. Charts)</description>
		<content:encoded><![CDATA[<p>How about rather than introducing a new variable you make use of the existing LayoutInfoBase.managed variable.  According to the API docs, this variable &#8220;Defines whether the node(s) referencing this layout info should have their layout managed by their parent container.&#8221;</p>
<p>This could also be interpreted as having the size self-managed by the control if it is set to false.</p>
<p>Some other reasons why this conveniently works out include:<br />
* It defaults to true (which is exactly what you wanted for your autoSize proposal)<br />
* It resizes the component properly in the non-managed Container case<br />
* It works with other UI elements that are not Controls (e.g. Charts)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philippe Lhoste</title>
		<link>http://fxexperience.com/2009/07/controls-autosize/comment-page-1/#comment-66</link>
		<dc:creator>Philippe Lhoste</dc:creator>
		<pubDate>Sun, 12 Jul 2009 08:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://fxexperience.com/?p=119#comment-66</guid>
		<description>@Raju: the compiler warning isn&#039;t a good idea if autoSize can be changed dynamically. Or perhaps it should be public-read init.

I fully agree with Simon, unless you need special effects, most controls should have a fixed size, and in case of special effects, if the control extends Resizable (they all do, no?), you can just change width or height properties.

When you change the content of a control, you can also trigger a resize request, eg. fitTocontent() or similar. Or provide functions to get the size of the modified content, depending on font and stuff, so that the program can resize manually the control (might want to stick to a number of predefined sizes, add margins, etc.).

Just throwing some ideas...</description>
		<content:encoded><![CDATA[<p>@Raju: the compiler warning isn&#8217;t a good idea if autoSize can be changed dynamically. Or perhaps it should be public-read init.</p>
<p>I fully agree with Simon, unless you need special effects, most controls should have a fixed size, and in case of special effects, if the control extends Resizable (they all do, no?), you can just change width or height properties.</p>
<p>When you change the content of a control, you can also trigger a resize request, eg. fitTocontent() or similar. Or provide functions to get the size of the modified content, depending on font and stuff, so that the program can resize manually the control (might want to stick to a number of predefined sizes, add margins, etc.).</p>
<p>Just throwing some ideas&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Morris</title>
		<link>http://fxexperience.com/2009/07/controls-autosize/comment-page-1/#comment-65</link>
		<dc:creator>Simon Morris</dc:creator>
		<pubDate>Sun, 12 Jul 2009 02:36:33 +0000</pubDate>
		<guid isPermaLink="false">http://fxexperience.com/?p=119#comment-65</guid>
		<description>With the possible exception of a hyperlink, very very rarely do I ever really want a control to resize itself once displayed.  If I had a button with a label which changed from &quot;Ok&quot; to &quot;Cancel&quot;, I&#039;d prefer it to be pre-sized to accept the larger text right from the start, precisely because visible resizing generally looks ugly (and unprofessional).

Perhaps a better strategy might be to not have the controls dynamically resize simply because their contents have changed (obviously fonts changes, etc, are a different matter entirely), but to provide easier ways to hint at their maximum potential size, without having to monkey about with pixel dimensions...

Button {
  text: &quot;Ok&quot;
  maxText: &quot;Cancel&quot;
}</description>
		<content:encoded><![CDATA[<p>With the possible exception of a hyperlink, very very rarely do I ever really want a control to resize itself once displayed.  If I had a button with a label which changed from &#8220;Ok&#8221; to &#8220;Cancel&#8221;, I&#8217;d prefer it to be pre-sized to accept the larger text right from the start, precisely because visible resizing generally looks ugly (and unprofessional).</p>
<p>Perhaps a better strategy might be to not have the controls dynamically resize simply because their contents have changed (obviously fonts changes, etc, are a different matter entirely), but to provide easier ways to hint at their maximum potential size, without having to monkey about with pixel dimensions&#8230;</p>
<p>Button {<br />
  text: &#8220;Ok&#8221;<br />
  maxText: &#8220;Cancel&#8221;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raju Bitter</title>
		<link>http://fxexperience.com/2009/07/controls-autosize/comment-page-1/#comment-64</link>
		<dc:creator>Raju Bitter</dc:creator>
		<pubDate>Sun, 12 Jul 2009 02:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://fxexperience.com/?p=119#comment-64</guid>
		<description>autoSize is a good idea, that&#039;s the way the problem is handled in other RIA platforms as well. It might be good to generate a compiler warning if someone places a button in a container and sets autoSize: true.</description>
		<content:encoded><![CDATA[<p>autoSize is a good idea, that&#8217;s the way the problem is handled in other RIA platforms as well. It might be good to generate a compiler warning if someone places a button in a container and sets autoSize: true.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

