layout,label,line,vaadin,break , Vaadin layout break line without panel

Vaadin layout break line without panel


Tag: layout,label,line,vaadin,break

I know it is possible for labels to automatically break lines when in a panel. Is there a way to have labels break lines when the text would be over a layouts width?

UPDATE OK i tried it with "800px" width now instead of "100%" and now the labels are having line breaks. Whats the reason for this behaviour? And how can I workaround this then for a percentual sizing of layouts as this is important for my page?

It currently looks like in the image below, the text is just cut off.

It currently looks like this

Extracted Code showing the setup:

    VerticalLayout labelLayout= new VerticalLayout();



I had exactly this problem, and managed to solve it using this CSS. Vaadin Labels have the CSS attribure white-space: nowrap which is what is stoping your text wrapping as you expect it to.

   white-space: normal;


Changing the text of a C++ CLI label

I am trying to change the text of a label in a C++ CLI program. I need to take a value the the user entered in a textbox, insert that into a short string, then change a label to that string. I have no problem constructing the string, but I...

CSS two columns without specific widths

I am trying to port a simple two column table to use div and float. I need the feature of a table that is able to scale the width of all columns to the largest content (without taking the whole browser width), but would like the added feature of floats...

WPF: 2 different label sizes in particular order alignment

Please take a look at this picture: I try to create same label with 2 sizes: <Grid> <Label Content="11" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="50" /> <Label Content="%" HorizontalAlignment="Right" FontSize="20" VerticalAlignment="Top"/> </Grid> But currently this is not like the picture: ...

Inline block challenges and suggestions for the layout

I keep reading articles that floats are outdated and that using inline-block solves problems such as having to use clearfix and a few more. These articles go on to justify inline-block by showing the same example: three squares that are aligned middle. In trying to use inline-block to create a...

Why isn't this program repainting a certain part of an applet even when repaint() is called

This is a simple rock, paper, scissors appelet. there are 3 variables keeping track of wins, losses, and ties. Then there is a label that is meant to display them. When I used the debugger the repaint method is being called so I don't understand why this portion of the...

Dynamically Resizing Controls on Windows Forms

I has a winform which can be resize. I has 4 chart control in the form and sit side by side. When the form is in maximum size, the layout of each chart control is run out. I try to set the anchor style but i got no luck. How...

How to use custom css file for layout of a module in Yii2

I am using basic pack of Yii2. I created a module named Admin and I want this module has it own layout but i don't know where to put all its css files. Then, how to include them in layout.php. My dirs like this: basic -- module -- admin --...

Possible to change border position based on adjacent blocks in CSS?

I'm using a flexbox layout with a few blocks that can wrap. I'd like each block to create a border dynamically depending on its position relative to adjacent blocks. For example, if it is to the right of a block, I'd like a border on its left-hand side. If it...

how do i get rows and columns dynamically in windows phone app?

In my application i need to design the seat layout arrangement in the form of rows and columns dynamically. Please any one suggest me how to get rows and columns and which view i need to use. this my xaml code <Grid x:Name="grid" Background="White"> <Button HorizontalAlignment="Stretch" Foreground="Black" Margin="23,56,268,527">Text</Button> </Grid> this...

Trouble dynamically changing state of checkbox with AJAX

I am trying to have to check boxes through ajax, but it is not working properly. I am not able to change state of the first checkbox, only the second one is working fine. Could anyone spot the error here? $.ajax({ type:"POST", url:"../scripts/domainlist.php?dept="+deptid+"&pro="+proid, contentType:"application/json; charset:utf-8", dataType:"json", success: function(data){ $('#domainlist').empty(); $('#domainlist')...

Error Parsing XML: not well formed (invalid token)

I'm receiving the following message when compiling my android project: Error Parsing XML: Not well-formed (Invalid token) This is the XML layout file where the error is supposed to be: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0.5"...

Change extends(layout) dynamically in laravel 5

I have been trying to change layout dynamically in laravel by just passing a variable in @extends('default1.master') to $var = default2 @extends('$var.master') possibly @extends($var.'.master') tried a lot but unable to find a solution all I get is error in my syntax or view not found....

How to achieve the following in extjs

--Title------------------------------- | | | | | <Content> | | | |_____________________________________| How to achieve the above panel in extjs? Edit: It should look something like this:

Move textview from top to bottom

In the image above I want to move the textview containing bill microsoft under the image and the other textview. How can I do this? I have written this layout right now. < android:id="@+id/card_tracks" xmlns:android="" android:layout_width="match_parent" android:layout_height="180dp" android:layout_gravity="center" android:layout_margin="16dp" android:elevation="7dp"> <LinearLayout android:id="@+id/main_ll" android:layout_width="match_parent"...

Allow absolutely positioned child to render outside parent with overflow: hidden

How to allow for absolutely positioned element to disobey it's ancestor overflow: hidden and render outside it? The situation is complicated by the fact that there is a position: relative on the element between them in the ancestor hierarchy. Here's a pen. In this situation how to allow red inner...

trouble with GridBagLayout and panels

So what I am trying to do is create this: I am using a gridbag layout and here is what I have so far: public class board { public static void addComponentsToPane(Container pane) { pane.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); JPanel leftTop = new JPanel(); leftTop.setPreferredSize(new Dimension(251,300)); leftTop.setBackground(; c.fill...

Get error in Swing java - IllegalArgumentException

Tried to put on frame some swing components. This code worked to days ago. Now it's not work, didn't nothing. Maybe somebody can tell me what it's wrong? public static void main(String[] args) { JFrame mainFrame = new JFrame(); mainFrame.setSize(500, 400); //Size of frame mainFrame.setTitle("Cinema City"); //Set title mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel...

An activity with two listviews in android

MainAcitivity public class MainActivity extends Activity { ListView list, listYear; String[] web = { "Google Plus", "Twitter", "Windows", "Bing", "Itunes", "Wordpress", "Drupal" } ; String[] year = { "2012", "2013", "2014", "2015", "2016", "2017", "2018" } ; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); list=(ListView)findViewById(; list.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, web));...

Adding margins to listview

I am following a tutorial and I did not understand why exactly the margins that I applied to a list view contained within a relative layout does not affect the look when I test it on a device. However, if I put everything in a LinearLayout container it looks as...

Add block to all CMS Pages with certain URL Key

I'm trying to discover whether this is possible or not. We have a series of CMS pages that represent our library. So the URL keys for these pages are something like: library/ library/top-ten library/five-questions library/faq etc... The powers that be want to add a static block that will appear only...

How do you make a div only extend in one direction when the outer container size increases?

I'm trying to make a a page container with a navigation bar on the left (inside of the container). When the outer page is wider than the container, I would like just the navigation bar to extend left up to a certain size while the rest of the container's contents...

strange behaviour with UINavigationController and autolayout top layout guide

I am using auto layout for a controller under navigation controller. For this controller, I mainly have a scroll view inside the controller's view. the alignment rule for the scroll view is top layout guide, bottom layout guide, leading aligned with super view and trailing as well. the layout is...

Custom TextView with icon

I need to obtain some TextView with a custom icon on them, such as these ones: but I've only been able to do this: my 3 TextView: <LinearLayout android:id="@+id/info" android:layout_marginTop="80dp" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerHorizontal="true" android:orientation="horizontal" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" android:layout_marginLeft="16dp" android:layout_marginStart="16dp"> <TextView android:id="@+id/info_totali"...

CSS 3 Column Layout Collapses Under Large Screen Width

I have the following section of code for by CSS 3-Column Layout. However under a very large screen width, the first column collapses (around 2000px). I added the code for the navigation, as the links could be impacting the display of the columns. CSS and HTML #container { width: 75%;...

How to put a layout below other layout in Android

I have this code: RelativeLayout frame = new RelativeLayout(activity); RelativeLayout layout = new RelativeLayout(this); RelativeLayout.LayoutParams dateArea = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.MATCH_PARENT, 90); dateArea.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); DisplayMetrics displayMetrics = this.getResources().getDisplayMetrics(); int height = displayMetrics.heightPixels; RelativeLayout mapLayout = new RelativeLayout(this); RelativeLayout.LayoutParams mapParam = new RelativeLayout.LayoutParams(...

Border some cells in table via CSS

In a very basic table I would like to put a border around some specific cells. I created for instance this table: <?php echo '<link rel="stylesheet" type="text/css" href="style1tt.css">'; echo '<table>'; echo '<tr> <th>name</th> <th>score</th> <th>position</th></tr>'; echo '<tr> <td>Bart</td> <td>189</td> <td>2</td></tr>'; echo '<tr> <td>Shirley</td> <td>211</td> <td>1</td></tr>';...

gnuplot rowstacked histogram: how to put sum above bars

This question is related to gnuplot histogram: How to put values on top of bars. I have a datafile file.dat: x y1 y2 1 2 3 2 3 4 3 4 5 and the gnuplot: set style data histogram; set style histogram rowstacked; plot newhistogram 'foo', 'file.dat' u 2:xtic(1) t...

Android Google Map in FragmentDialog being overlayed by the Dialog's own gray overlay

I just migrated a MapView from an Activity's layout to a DialogFragment. It was a pretty painless migration: A button on the activity launches the dialog, setting the LatLng the map requires: case fragmentManager = getSupportFragmentManager(); DirectionsMapDialogFragment mapDialogFragment = new DirectionsMapDialogFragment(); mapDialogFragment.setLatLng(mLatLng); mapDialogFragment.setRetainInstance(false);, "fragmentName"); break; In the...

A way to adapt the position of items in an android layout

I am currently work on an Android project, I have to show several check-box, now they are in a Relative Layout and all are positioned to their left neighbor. So in landscape, I have a line of check-box, the problem is if I switch in Portrait the line is cut,...

Ext JS Dashboard Layout and maximize/minimize panels

I'm attaching a picture with the mock up that I'm trying to develop with Ext JS. I'm using a Border layout, and then a Dashboard for the central part, however I see some limitations on it: Panels in the dashboard don't have minimize or maximize button. How can I implement...

One controller uses its corresponding layout, but the other does not

My Rails project has two controllers, a SessionsController and a CustomersController. My project also has two layout views in the layouts directory, sessions.html.erb and customers.html.erb. I would like the SessionsController to render using the session.html.erb layout and the CustomersController to render using the customers.html.erb layout. I have removed all explicit...

UICollectionView layout issue on iphone 5

I have a problem with my UICollectionView, I have 3 columns and everything works fine instead of iphone 5 and 4. In iphone 6 my collectionview looks that (width in cell): Iphone 5 with cells: The problem is, when in last row, I have 2 cells, and it looks like...

graphviz cluster's label multiple lines

I'm using python+graphviz in order to create networking topologies out of the information contained in Racktables. I've succeded pretty well so far but I'm willing now to add multiple lines labels to a cluster (not a node). For example, I have the following code with python: for router in routers:...

Labelling nodes in networkx

I'm trying to extract one set of values from a URL. This set has a unique list of numbers. The number of elements in this list should be equal to the number of nodes. So the label that these nodes get should come from the list extracted. How can this...

Plug-in: error

when I'm trying to add a Toggle Button I get an error, would you please help me here? I added a text.xml as a layout and I'm filling it. and the description is: java.lang.ArrayIndexOutOfBoundsException: -1 at android.view.ShadowPainter.createDropShadow( at android.view.ShadowPainter.createDropShadow( at android.view.ViewGroup_Delegate.getPathShadow( at android.view.ViewGroup_Delegate.drawShadow( at...

Strange layout issue

I am using a relative layout, and this is a section taken from it: <ImageView android:id="@+id/btnLifeMinus5" android:layout_width="50dp" android:layout_height="50dp" android:background="#2a80b9" android:visibility="invisible" android:adjustViewBounds="false" android:clickable="true" android:cropToPadding="false" android:padding="0dp" android:scaleType="fitStart" android:layout_marginLeft="0dp" android:layout_marginTop="0dp" /> <ImageView android:id="@+id/btnLifePlus5" android:layout_width="50dp"...

SAS proc sql - how to read in log of variable but retain the variable's label

I am reading in variables from a few different datasets using proc sql, which I am trying to improve on. What I'd like to do is read in a variable from a dataset using proc sql, but take the log of the variable as it's read in, but keep the...

Label linked to a text box value

Good morning, I am editing an User Form on VBA Excel and I would like to show an alert if the user insert a certain value in a text box. I wrote this code: If txtbox.Value < 0 Then lbl_Alert.Visible= True Else lbl_alert.Visible=False End IF The code works properly but...

How to aligning textviews on the left and right side of a linearlayout

According to below codes <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_vertical|center_horizontal" android:layout_marginTop="15dip"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="نوع" android:gravity="left" android:layout_weight="1" android:id="@+id/txt_type" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="تاریخ:...

Why these ImageButtons(delete and update) are overlaying

this .xml will be the layout of the item in the RecycleView list, but the last two Buttons are overlaying <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#Ffffff" android:baselineAligned="false" android:weightSum="1"> <LinearLayout android:id="@+id/thumbnail" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="3dip"...

Eclipse Layout: static instead of relative values?

I have a layout with two Buttons. One button is in the Center of the left half, and the other button is in the Center of the right side. But I use relative values (left="60dp" etc.). How can I have the same result with static values? Because I don't want...

Designing layout android

I am currently trying to create a list view which will show details about a post. For that, I have created xml file for designing the list item. This is the final look I want for my activity. So far I have succeeded dealing with the rounded corners, image buttons...

Why declaring @+id is allowed in other than id attributes

So lastly I have had to rebuild not my XML layout file for android app. And I saw constructions like <RelativeLayout xmlns:android="" android:layout_width="fill_parent" android:layout_height="wrap_content"> <LinearLayout android:id="@+id/rev_main" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/rev_arrow"> <!-- some stuff in here --> </LinearLayout> <ImageView android:id="@+id/rev_arrow"...

java Swing: how to keep one component left aligned with another component centered with respect to parent

Say I have two components, A and B, in a JPanel. I want Component A to stay left aligned, while Component B does its best to stay in the middle of the panel. I mocked up the following demo (sorry for the quality, I made it in paint): What I...

What's the layouts folder for in Rails?

I understand that .html.erb files go within app/views or its subfolders. But what is the app/views/layouts folder in particular for in Rails?

Update label's text when pressing a button in Kivy for Python

Here is my code: I want to make a game where the main_label changes text when you press a button but I've looked everywhere for a week and still don't understand how to do it. I looked on Kivy's website but I don't understand. As you can see I'm new...

How to increase the indent size in (Cloud9)

In my cloud9 editor, I somehow have for some files that my indent is 3 characters and for others 7. Is there a way to harmonize this and have the same indent everywhere? Is there perhaps also an auto-indent? Example of indent with 3 characters: function indent3() { // code...

How to make Search Dialog size of a toolbar

So I learned how to make Search dialog with this tutorial but it doesn't look pretty and I'm looking for proper way to fix it. As you can see search widget doesn't cover fully the toolbar and I think making it shorter by using constant dp values is not a...

Change axis displayed value in D3

I would like to change the value of the y-axis in my graph, such as, instead of displaying [0,18], it displays [-18,0]. My initial code for the axis is: var y = d3.scale.linear().range([height, 0]); var yAxis = d3.svg.axis() .scale(y) .orient("left"); and I tried to modify it like this: var yAxisInv...

Where to place and files in project?

I'm very new to Android studio and I'm currently following a tutorial that implements a sliding tab layout for an application. The tutorial says to put and in our project, but doesn't say exactly where. For now, I just put declared them as two classes and put them...