How to create multiline ListBox in GWT?
Tags: html,css,gwt
Problem :
In my project the value to show in GWT list-box is big(from database). So user is not able to see the full value at once. For this I have decided to add display value in multiline. I have used tags like \n and HTML tags like breakline but not getting the result. GWT compiler considering these tags as a string and showing in the list. How can I do this. Can I apply customized css?
My code is as below:
ListBox getListBox(boolean dropdown) {
String longText = "AAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCCCCCC";
ListBox widget = new ListBox();
widget.addStyleName("demo-ListBox");
widget.addItem(longText);
widget.addItem("Two");
widget.addItem("Three");
widget.addItem("Four");
if(!dropdown)widget.setVisibleItemCount(3);
return widget;
}
Solution :
GWT ListBox
simply wraps an HTML select
element. Such element does not allow line breaks in its option
values.
You can:
- change approach: use a short description with a longer
title
attribute; - roll out your own widget, or use one already available (like the new
GwtChosen
).
CSS Howto..
If you just want basic squares with text in them you probably want something like: <html> <head> <style> .square { color:black; border-style: solid; border-width: 10px; width: 200px; height: 200px; text-align:...
Specify a width, max-width, and min-width for the table cells, with the same value for all three properties.
I'm not completely sure of what your asking but from what I can gather it sounds like you need with CSS width property? .myInput { background: white url(images/smiley.png) center left...
The reason .gallery__card is wider than gallery__card__imgis because of the text you have in .gallery__card. If you remove the text, it will stay as wide as .gallery__card__img. See here. You...
Hope this helps extremely simple simply add this code where you want it then there is no left and right links to next n prev if want images same size...
check it out, DEMO .pricetag:before{ position:absolute; content:"\25CF"; color:white; text-shadow: 0 0 1px #333; font-size:11px; line-height:0px; text-indent:12px; left:-42px; // <-- increase this top: 0; // <-- add this width: 1px; height:0px;...
After doing lots of research and development; there is basically nothing standard out there for a JS based solution. I checked Dojo, Sencha and some others paid stuff. At the...
In your case the td's color covers the tr table tr td { padding: 20px; background: transparent !important; } .warning { background: #76A0D3; } <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> <table class="table...
You have to apply the corresponding CSS class: <div class="ui-icon ui-icon-plus"></div> Assuming that you have the correct jQuery UI .css file with those classes defined. If you look at the...
Use firebug console command line to run click event. Like $('#menutab a').click(); If it's needed, you could also set breakpoint to avoid hidding. Read more in firebug documentation...
Please go to System >> Configurations >> Developer then select the required store view from Current Configuration Scope from top left drop-down. Then under Debug tab, enable the Template Paht...
You can use absolute positioning: <div style="height: 600px; position: relative;"> <div class="box" style="width: 30%; height: 70%; top: 0%; left: 0%;">1</div> <div class="box" style="width: 70%; height: 20%; top: 0%; left: 30%;">2</div>...
Give CSS style to the div class="statcounter"> div.statcounter{ max-width: 100px !important; max-height: 100px !important; } W3Schools example: http://www.w3schools.com/cssref/pr_dim_max-width.asp On the website you gave in comment the problem seems to be:...
like this: HTML <nav> <img src="image.png" alt="image"> </nav> CSS nav{ position:relative; } nav img{ position:absolute; top:0; right:0; } ...
OK, there was an answer that was deleted although it was correct. This is the CSS that works: .main_block .items_block .items_container .thumbnail { border: 1px solid #cdced0; border-radius: 3px; padding:...
Ideally both of these should work. You just might have made your selectors a little more complex than they needed to be. I've just edited this post. I think this...
Here's a general mixin you can use to create a pair of properties: @mixin ieprop($name, $elementWidth, $containerWidth) { #{$name}: percentageWidth($elementWidth, $containerWidth); *#{$name}: iePercentageWidth($elementWidth, $containerWidth); } You pass the property name...
I have changed your code a bit. Take a look here and see if that helps you (http://jsbin.com/UdODawI/1/) .thumbnails { width: 100%; margin: 0 auto; list-style-type: none; } .wrapper {...
You can use :not(:first-child) div table tr:not(:first-child) { } ...
See if this solution is helpful I have added notselected class by default to all the a tags html Red blood cells (RBCs) principal means of delivering oxygen to the...
there are a bunch of ways to align items side-by-side. i made an example with float:left; . it works also with display:inline-block but you need to set the width of...
margin:auto won't work if you have absolutely positioned divs so to center the hexagon, you have to add top:50%, left:50% and margin: -86.6px 0 0 -150px. The -86.6px is half...
What you need isn't floating but the style white-space: nowrap; Apply the nowrap on your container and set your items to display inline. Refer to the jsfiddle below. Here is...
Use last child selector on .row and set the background-color: white; to it's child .article-container. Check below is an example. div.article-container { background-color: red; } .row:last-child .article-container { /* Change...
You can specify your own curve with the -webkit-animation-timing-function CSS property. The format of the function is cubic-bezier(P1x, P1y, P2x, P2y) where P1 and P2 are the two middle points...
Try the following code, it should work, just to make sure you use jquery plugin at once and organize it properly. <!DOCTYPE html> <html> <head> <link href="css/bootstrap.css" rel="stylesheet"/> <link rel="stylesheet"...
To get the correct path of your stylesheet relative to the page, call the ResolveClientUrl method of your user control, passing it the path of the stylesheet relative to the...
With jQuery, you are adding your styles to the style attribute of the element. It is removed again, if you call the function again with an empty string (""). This...
I suppose CSS editor is not supported for community edition, as it said at the language support part of IntelliJ IDEA Editions Comparison
Firstly you missed a semi-colon after one of your CSS rules (height: 30px), so the rest of the rules for that selector weren't being called. So solve your problem (as...