English 中文(简体)
如何在瓦亚丁部分划定边界?
原标题:How to set a border on a Vaadin component?
  • 时间:2011-04-08 11:58:48
  •  标签:
  • vaadin

我愿从方案上在贾瓦建立一个表格组成部分的边境。 我怎么能够这样做,而不必篡改风格?

最佳回答

你可以用一个小组的组成部分总结表格,该小组已经确定了边界。 否则,除了使用特别安全局之外,别无选择。

One option, if you wish to stay inside the server environment, is to use the CSSInject add-on and add the border using that (you still need to write CSS, but you can do it on the server in a Java file and not inside a regular CSS file).

问题回答

Vaadin Flow — Style::set to specify CSS

In Vaadin Flow (Vaadin versions 10 and later), you can conveniently set CSS for a widget or layout programmatically. No need to edit separate CSS files, even though styling with CSS files is the recommended way.

  1. On your widget/layout, call getStyle to retrieve the Style object.
  2. On that Style object, call set to pass the name and value of your CSS property.

For example, I find setting a bright colored border on my nested layouts quite helpful for debugging.

myVerticalLayout.getStyle().set( "border" , "6px dotted DarkOrange" ) ; 

您可在上查阅。 回答至此处的另外一个问题:

screenshot of a layout with an obnoxious orange border added for debugging purposes




相关问题
Client Browser detection in Vaadin

I want to set different themes to my Vaadin application, depending on the user agent. In particular I want to distinguish at least between mobile devices (iPhone, Android,...) and desktop web browser. ...

Using Clojure with Vaadin

Has anyone tried implementing a web application with Clojure ( using Compojure ) and Vaadin ? I had seen an article on using Clojure with JWT for creating web apps. Vaadin is based on GWT so you get a ...

How to change the tabbar color in vaadin?

Hi want to change the tab color when the tab get focus in vaadin?can any one help me how to customize tabsheet to achive this..

采用Vadin的植被

能否在《维也纳条约法公约》申请范围内使用瓦亚丁框架中的植被?

热门标签