You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Brendan cheng <cc...@hotmail.com> on 2013/06/10 08:44:10 UTC

Avoid FillPane width negative

Dear all,
I wonder how to setup a TablePane, let's say, two columns with one's width is -1 and the other "1*", so that the second expand as container expand but I also want the second column to have a minimum width.  so that when outer container is too small, I will end up with negative width of the second column.
Here is the actual cod in bxml:
<TablePane>
<columns>
<TablePane.Column width="-1" />
<TablePane.Column width="1*" />
</columns>
<TablePane.Row height="-1">
	<BoxPane styles="{padding:4, horizontalAlignment:'center',
        verticalAlignment:'center'}">
	<PushButton bxml:id="uploadButton" buttonData="%UploadButton" enabled="false" />
	<PushButton bxml:id="cancelButton" buttonData="%CancelButton" enabled="false" />
        </BoxPane>
	<FillPane styles="{padding:4}" minimumWidth="100">
	<TextInput bxml:id="formulaTextInput" enabled="false" minimumWidth="100" />
	</FillPane>
</TablePane.Row>
</TablePane>
Here I try to put minimumWidth in the FillPane and TextInput, but no use.
Regards,
Brendan


 		 	   		  

RE: Avoid FillPane width negative

Posted by Brendan cheng <cc...@hotmail.com>.
Hi Roger,
Thanks for the suggestion.  It solves part of the problem.  As under the main window, there is also a split pane which I don't know how to set the minimum size of width or height.  I can only set the initial ratio of 0.33 in that case.
Any suggestion?
Brendan

Subject: RE: Avoid FillPane width negative
Date: Tue, 16 Jul 2013 16:42:03 -0400
From: Roger.Whitcomb@actian.com
To: user@pivot.apache.org

Hi Brendan,                That is a good thought �C let me look into that.  But, I think you can still set the minimum width of your main application window to avoid the possibility of it going too small.  We did this by doing the following:                public void startup(Display display, Map<String, String> properties) {��                    java.awt.Window hostWindow = display.getHostWindow();                    hostWindow.setMinimumSize(new Dimension(1024, 768));                 Let us know if this does NOT work and then we can look further at your suggestion to deal with the negative width differently. HTH,~Roger Whitcomb From: Brendan cheng [mailto:ccp999@hotmail.com] 
Sent: Tuesday, July 16, 2013 2:31 AM
To: pivot user list
Subject: RE: Avoid FillPane width negative Hi Roger, In my case, the only set the outermost container is still not guarantee the fill pane width is always positive.I wonder if it is sensible to bypass layout if the width or height is less than zero instead of throwing an error. BrendanSubject: RE: Avoid FillPane width negative
Date: Mon, 24 Jun 2013 13:37:16 -0400
From: Roger.Whitcomb@actian.com
To: user@pivot.apache.orgHi Brendan,                I think what you want to do is set a minimum width on your outermost container (Frame or Window).   HTH,~Roger Whitcomb From: Brendan cheng [mailto:ccp999@hotmail.com] 
Sent: Sunday, June 09, 2013 11:44 PM
To: pivot user list
Subject: Avoid FillPane width negative Dear all, I wonder how to setup a TablePane, let's say, two columns with one's width is -1 and the other "1*", so that the second expand as container expand but I also want the second column to have a minimum width.  so that when outer container is too small, I will end up with negative width of the second column. Here is the actual cod in bxml: <TablePane><columns><TablePane.Column width="-1" /><TablePane.Column width="1*" /></columns><TablePane.Row height="-1">       <BoxPane styles="{padding:4, horizontalAlignment:'center',        verticalAlignment:'center'}">       <PushButton bxml:id="uploadButton" buttonData="%UploadButton" enabled="false" />       <PushButton bxml:id="cancelButton" buttonData="%CancelButton" enabled="false" />        </BoxPane>       <FillPane styles="{padding:4}" minimumWidth="100">       <TextInput bxml:id="formulaTextInput" enabled="false" minimumWidth="100" />       </FillPane></TablePane.Row></TablePane> Here I try to put minimumWidth in the FillPane and TextInput, but no use. Regards, Brendan    		 	   		  

RE: Avoid FillPane width negative

Posted by "Roger L. Whitcomb" <Ro...@actian.com>.
Hi Brendan,

                That is a good thought - let me look into that.  But, I
think you can still set the minimum width of your main application
window to avoid the possibility of it going too small.  We did this by
doing the following:

                public void startup(Display display, Map<String, String>
properties) {

...

                    java.awt.Window hostWindow =
display.getHostWindow();

                    hostWindow.setMinimumSize(new Dimension(1024, 768));

 

                Let us know if this does NOT work and then we can look
further at your suggestion to deal with the negative width differently.

 

HTH,

~Roger Whitcomb

 

From: Brendan cheng [mailto:ccp999@hotmail.com] 
Sent: Tuesday, July 16, 2013 2:31 AM
To: pivot user list
Subject: RE: Avoid FillPane width negative

 

Hi Roger,

 

In my case, the only set the outermost container is still not guarantee
the fill pane width is always positive.

I wonder if it is sensible to bypass layout if the width or height is
less than zero instead of throwing an error.

 

Brendan

________________________________

Subject: RE: Avoid FillPane width negative
Date: Mon, 24 Jun 2013 13:37:16 -0400
From: Roger.Whitcomb@actian.com
To: user@pivot.apache.org

Hi Brendan,

                I think what you want to do is set a minimum width on
your outermost container (Frame or Window).  

 

HTH,

~Roger Whitcomb

 

From: Brendan cheng [mailto:ccp999@hotmail.com] 
Sent: Sunday, June 09, 2013 11:44 PM
To: pivot user list
Subject: Avoid FillPane width negative

 

Dear all,

 

I wonder how to setup a TablePane, let's say, two columns with one's
width is -1 and the other "1*", so that the second expand as container
expand but I also want the second column to have a minimum width.  so
that when outer container is too small, I will end up with negative
width of the second column.

 

Here is the actual cod in bxml:

 

<TablePane>

<columns>

<TablePane.Column width="-1" />

<TablePane.Column width="1*" />

</columns>

<TablePane.Row height="-1">

       <BoxPane styles="{padding:4, horizontalAlignment:'center',

        verticalAlignment:'center'}">

       <PushButton bxml:id="uploadButton" buttonData="%UploadButton"
enabled="false" />

       <PushButton bxml:id="cancelButton" buttonData="%CancelButton"
enabled="false" />

        </BoxPane>

       <FillPane styles="{padding:4}" minimumWidth="100">

       <TextInput bxml:id="formulaTextInput" enabled="false"
minimumWidth="100" />

       </FillPane>

</TablePane.Row>

</TablePane>

 

Here I try to put minimumWidth in the FillPane and TextInput, but no
use.

 

Regards,

 

Brendan

 

 

 


RE: Avoid FillPane width negative

Posted by Brendan cheng <cc...@hotmail.com>.
Hi Roger,
In my case, the only set the outermost container is still not guarantee the fill pane width is always positive.I wonder if it is sensible to bypass layout if the width or height is less than zero instead of throwing an error.
Brendan

Subject: RE: Avoid FillPane width negative
Date: Mon, 24 Jun 2013 13:37:16 -0400
From: Roger.Whitcomb@actian.com
To: user@pivot.apache.org

Hi Brendan,                I think what you want to do is set a minimum width on your outermost container (Frame or Window).   HTH,~Roger Whitcomb From: Brendan cheng [mailto:ccp999@hotmail.com] 
Sent: Sunday, June 09, 2013 11:44 PM
To: pivot user list
Subject: Avoid FillPane width negative Dear all, I wonder how to setup a TablePane, let's say, two columns with one's width is -1 and the other "1*", so that the second expand as container expand but I also want the second column to have a minimum width.  so that when outer container is too small, I will end up with negative width of the second column. Here is the actual cod in bxml: <TablePane><columns><TablePane.Column width="-1" /><TablePane.Column width="1*" /></columns><TablePane.Row height="-1">       <BoxPane styles="{padding:4, horizontalAlignment:'center',        verticalAlignment:'center'}">       <PushButton bxml:id="uploadButton" buttonData="%UploadButton" enabled="false" />       <PushButton bxml:id="cancelButton" buttonData="%CancelButton" enabled="false" />        </BoxPane>       <FillPane styles="{padding:4}" minimumWidth="100">       <TextInput bxml:id="formulaTextInput" enabled="false" minimumWidth="100" />       </FillPane></TablePane.Row></TablePane> Here I try to put minimumWidth in the FillPane and TextInput, but no use. Regards, Brendan    		 	   		  

RE: Avoid FillPane width negative

Posted by "Roger L. Whitcomb" <Ro...@actian.com>.
Hi Brendan,

                I think what you want to do is set a minimum width on
your outermost container (Frame or Window).  

 

HTH,

~Roger Whitcomb

 

From: Brendan cheng [mailto:ccp999@hotmail.com] 
Sent: Sunday, June 09, 2013 11:44 PM
To: pivot user list
Subject: Avoid FillPane width negative

 

Dear all,

 

I wonder how to setup a TablePane, let's say, two columns with one's
width is -1 and the other "1*", so that the second expand as container
expand but I also want the second column to have a minimum width.  so
that when outer container is too small, I will end up with negative
width of the second column.

 

Here is the actual cod in bxml:

 

<TablePane>

<columns>

<TablePane.Column width="-1" />

<TablePane.Column width="1*" />

</columns>

<TablePane.Row height="-1">

       <BoxPane styles="{padding:4, horizontalAlignment:'center',

        verticalAlignment:'center'}">

       <PushButton bxml:id="uploadButton" buttonData="%UploadButton"
enabled="false" />

       <PushButton bxml:id="cancelButton" buttonData="%CancelButton"
enabled="false" />

        </BoxPane>

       <FillPane styles="{padding:4}" minimumWidth="100">

       <TextInput bxml:id="formulaTextInput" enabled="false"
minimumWidth="100" />

       </FillPane>

</TablePane.Row>

</TablePane>

 

Here I try to put minimumWidth in the FillPane and TextInput, but no
use.

 

Regards,

 

Brendan