Space between widgets in FlowPanel ?

1,217 views
Skip to first unread message

Kris

unread,
Feb 20, 2013, 1:44:35 PM2/20/13
to google-we...@googlegroups.com
Hi, How can I get spaces between widgets in FlowPanel ? I have google a while now, but couldn't find any solution, and can see a lot of other people have the same problem. 
I have a FlowPanel with text boxes.. and all are right on top of each other. 

Andy Stevko

unread,
Feb 20, 2013, 2:03:01 PM2/20/13
to google-web-toolkit
padding the style?


On Wed, Feb 20, 2013 at 10:44 AM, Kris <kli...@gmail.com> wrote:
Hi, How can I get spaces between widgets in FlowPanel ? I have google a while now, but couldn't find any solution, and can see a lot of other people have the same problem. 
I have a FlowPanel with text boxes.. and all are right on top of each other. 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
-- A. Stevko
===========
"If everything seems under control, you're just not going fast enough." M. Andretti




Kristian Lind

unread,
Feb 20, 2013, 2:05:06 PM2/20/13
to google-we...@googlegroups.com
And how.. I tried diff ways, nothing works.. do you have an example
Best regards

Kristian Lind

Andy Stevko

unread,
Feb 20, 2013, 3:09:55 PM2/20/13
to google-web-toolkit
Do you have a uibinder fragment that shows the widgets you are using?

Kristian Lind

unread,
Feb 20, 2013, 3:14:19 PM2/20/13
to google-we...@googlegroups.com
Here is a part of my code... 

FlowPanel txtBoxes = new FlowPanel();
txtBoxes.setWidth("100px");

final TextBox name = new TextBox();
name.setVisibleLength(30);
txtBoxes.add(name);
name.setSize("200px", "10px");
final TextBox media = new TextBox();
media.setVisibleLength(30);
txtBoxes.add(media);
media.setSize("200px", "10px");

final TextBox height = new TextBox();
height.setDirectionEstimator(false);
height.setVisibleLength(30);
txtBoxes.add(height);
height.setSize("200px", "10px");

final TextBox width = new TextBox();
width.setVisibleLength(30);
txtBoxes.add(width);
width.setSize("200px", "10px");

Andy Stevko

unread,
Feb 20, 2013, 3:40:41 PM2/20/13
to google-web-toolkit
Try adding a style name to your textboxes and set the padding there.

height.addStyleName("paddedTextbox")

in your style resource
.paddedTextBox {
      padding: 3px 3px 3px 3px;

K vfdsdfbsdb

unread,
Feb 20, 2013, 5:51:22 PM2/20/13
to google-we...@googlegroups.com

you just have to add [new Label(" ")] in between it.

2013/02/21 3:44 "Kris" <kli...@gmail.com>:
Hi, How can I get spaces between widgets in FlowPanel ? I have google a while now, but couldn't find any solution, and can see a lot of other people have the same problem. 
I have a FlowPanel with text boxes.. and all are right on top of each other. 

Kris

unread,
Feb 20, 2013, 6:46:48 PM2/20/13
to google-we...@googlegroups.com
That didn't help.. the textbox just got a little bigger.. :( 
padding the style?


To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
-- A. Stevko
===========
"If everything seems under control, you're just not going fast enough." M. Andretti




--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Best regards

Kristian Lind

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
-- A. Stevko
===========
"If everything seems under control, you're just not going fast enough." M. Andretti




--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Best regards

Kristian Lind

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kris

unread,
Feb 20, 2013, 6:47:27 PM2/20/13
to google-we...@googlegroups.com
the new label did do anything either.. 


On Wednesday, February 20, 2013 2:51:22 PM UTC-8, hprc wrote:

you just have to add [new Label(" ")] in between it.

2013/02/21 3:44 "Kris" <kli...@gmail.com>:
Hi, How can I get spaces between widgets in FlowPanel ? I have google a while now, but couldn't find any solution, and can see a lot of other people have the same problem. 
I have a FlowPanel with text boxes.. and all are right on top of each other. 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

Abraham Lin

unread,
Feb 20, 2013, 9:51:42 PM2/20/13
to google-we...@googlegroups.com
What you want is the "margin" property, not the "padding" property.

Kris

unread,
Feb 21, 2013, 1:16:43 PM2/21/13
to google-we...@googlegroups.com
This works... 

.textBoxMargin {
     margin-top:2px;
margin-bottom:2px;
     margin-right:0px;
     margin-left:0px;
}

and apply that style to each textbox
Reply all
Reply to author
Forward
0 new messages