Is it possible to add a tooltip containing component in Vaadin? -
i need display tooltip contains table. table exist customcomponent. 1 of solutions duplicate table in html , use setdescription() method. looks little ugly, on opinion.
what mean ugly? @ examples @ vaadin book - nice.
i tried put table button description.
button b = new button("button"); b.seticon(fontawesome.legal); b.addstylename(valotheme.button_friendly); b.setdescription( "<table>\n" + " <tr>\n" + " <th style=\"padding: 10px;\">month</th>\n" + " <th style=\"padding: 10px;\">savings</th>\n" + " </tr>\n" + " <tr>\n" + " <td style=\"padding: 10px;\">january</td>\n" + " <td style=\"padding: 10px;\">$100</td>\n" + " </tr>\n" + " <tr>\n" + " <td style=\"padding: 10px;\">july</td>\n" + " <td style=\"padding: 10px;\">$342</td>\n" + " </tr>\n" + " <tr>\n" + " <td style=\"padding: 10px;\">november</td>\n" + " <td style=\"padding: 10px;\">$0</td>\n" + " </tr>\n" + "</table>\n" ); i use valo theme. , result is:
it has size issue because <th> , <td> have padding. simple increase table size makes better:
<table style=\"width:20em\"> you can customize in way. example added border:
you can customize whole tooltip using scss.



Comments
Post a Comment