主题不适用于 Button
我开始玩主题.我能够创建 CSS 并将 CSS 关联到各种表格元素.工作正常.
I started playing with themes. I was able so create CSS and associated the CSS to various table elements. Works fine.
现在我试图用一个按钮来做同样的事情.但它似乎不起作用.如果我将样式类应用到按钮上,它就会起作用.
Now I am trying to do the same with a button. But it does not seem to work. If I apply the styleclass right to the button then it works.
<theme extends="oneuiv2.1">
<resource>
<content-type>text/css</content-type>
<href>app.css</href>
</resource>
<resource>
<content-type>text/css</content-type>
<href>viewpicklistCC.css</href>
</resource>
<control>
<name>Button</name>
<property>
<name>styleClass</name>
<value>MyButton</value>
</property>
</control>
<control>
<name>HtmlTable</name>
<property>
<name>styleClass</name>
<value>PNCTable</value>
</property>
</control>
<control>
<name>HtmlTd</name>
<property>
<name>styleClass</name>
<value>PNCTableCell</value>
</property>
</control>
</theme>
.MyButton {
width:179.0px;
font-family:Arial,sans-serif;
font-size:18pt;
color:rgb(255,128,0);
font-weight:bold
}
在主题中,您需要使用控件的主题 ID 来定位它.这与 CSS 样式类不同.
In a theme you need to use the theme id of a control in order to target it. This is not the same as the CSS style class.
您可以在控件上手动设置主题 id(在样式 - 主题中,或在所有属性 - 样式 - 主题 id 中),然后通过引用此主题 id 来定位控件.
You can set the theme id manually on a control (in Style - Theme, or in All properties - Style - Theme id) and then target the control by referring to this theme id.
或者您可以使用控件的默认主题 ID.XPageswiki 包含核心控件的默认主题 ID 列表:http://xpageswiki.com/web/youatnotes/wiki-xpages.nsf/dx/Work_with_themes#themeID+values+for+core+controls
Or you can use the default theme id for a control. The XPageswiki contains a list of default theme ids for core controls: http://xpageswiki.com/web/youatnotes/wiki-xpages.nsf/dx/Work_with_themes#themeID+values+for+core+controls
因此,在您的情况下,您需要使用以下主题 ID 之一来定位您的按钮:
So in your case you need to use one of the following theme ids in order to target your button:
Button: Button.Command
Button with type=submit: Button.Submit
Button with type=cancel: Button.Cancel