pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rostislav Krasny <rosti....@gmail.com>
Subject Re: Layout component within ScrollPane
Date Sat, 13 Feb 2010 20:48:23 GMT
Unfortunatelly it doesn't work:

		TextArea textArea = new TextArea();
		textArea.setEditable(true);

		BoxPane pane1 = new BoxPane(Orientation.VERTICAL);
		pane1.add(textArea);

		StyleDictionary dict = pane1.getStyles();
		dict.put("fill", Boolean.TRUE);
		dict.put("verticalAlignment", VerticalAlignment.BOTTOM);

		ScrollPane pane2 = new ScrollPane(ScrollBarPolicy.ALWAYS,
ScrollBarPolicy.ALWAYS);
		pane2.setView(pane1);

		window = new Window(pane2);
		window.setTitle("Test application");
		window.setMaximized(true);
		window.open(display);


On Sat, Feb 13, 2010 at 10:11 PM, Greg Brown <gkbrown@mac.com> wrote:
> You'll need to put the text area in a container that is capable of aligning its content
to bottom. Try using a vertical BoxPane will the "fill" style set to true and the "verticalAlignment"
style set to "bottom". You can then use that as your scroll pane's view.
>
> On Feb 13, 2010, at 3:07 PM, Rostislav Krasny wrote:
>
>> It works. Thank you very much.
>>
>> I've yet another question. How can I align the text vertically? I want
>> it to be aligned to the bottom side.
>>
>> On Sat, Feb 13, 2010 at 9:55 PM, Greg Brown <gkbrown@mac.com> wrote:
>>> Try replacing this:
>>>
>>>> pane.add(textArea);
>>>
>>> with this:
>>>
>>>  pane.setView(textArea)
>>>
>>> G
>>>
>>> On Feb 13, 2010, at 2:41 PM, Rostislav Krasny wrote:
>>>
>>>> Hi,
>>>>
>>>> I use Pivot 1.4. I'm trying to make a window with a scroll pane and a
>>>> text area within it. Following is code of my startup() method.
>>>>
>>>>               TextArea textArea = new TextArea();
>>>>               textArea.setEditable(true);
>>>>
>>>>               ScrollPane pane = new ScrollPane(ScrollBarPolicy.ALWAYS,
>>>> ScrollBarPolicy.ALWAYS);
>>>>               pane.add(textArea);
>>>>
>>>>               window = new Window(pane);
>>>>               window.setTitle("Test application");
>>>>               window.setMaximized(true);
>>>>               window.open(display);
>>>>
>>>> However the text area has zero size dimensions and cannot be used. How
>>>> can I layout the text area according to the scroll pane dimensions
>>>> automatically?
>>>>
>>>> Thank you
>>>
>>>
>
>

Mime
View raw message