I tried to design some components in a e4 RCP application with css.

One thing I stumbled upon was that when you execute

cssEngine.setClassname(composite, "class1");
cssEngine.setClassname(composite, "class2");

It seems like composite would not have "class1" anymore but only "class2".

Isn't it possible like on website elements (<a class="class1 class2"></a>) to give one object multiple classes?

有帮助吗?

解决方案

Yes, HTML does support multiple classes. However the e4 IStylingEngine and WidgetElement classes only seem to support one class.

Update: Testing this further the CSS class matching code does deal with spaces in the class string so it is possible to specify multiple classes separated by space.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top