您的位置:首页 > 其它

Kodi ——6 Controls (12)6.12 ScrollBar Control

2016-06-14 14:56 507 查看

6.12 ScrollBar Control

滚动条控件用作lists, panels, wraplists, fixedlists, textboxes, 和grouplists页面控制。您可以选择的位置,大小,外观。

6.12.1 Example

<control type="scrollbar" id="17">
<description>My first scroll bar control</description>
<left>80</left>
<top>60</top>
<width>250</width>
<height>30</height>
<visible>true</visible>
<texturesliderbackground>scroll-background.png</texturesliderbackground>
<texturesliderbar>bar.png</texturesliderbar>
<texturesliderbarfocus>bar-focus.png</texturesliderbarfocus>
<textureslidernib>nib.png</textureslidernib>
<textureslidernibfocus>nib-focus.png</textureslidernibfocus>
<pulseonselect></pulseonselect>
<orientation>vertical</orientation>
<showonepage>false</showonepage>
<onup>2</onup>
<ondown>3</ondown>
<onleft>1</onleft>
<onright>1</onright>
</control>

6.12.2 Available Tags

In addition to the
Default Control Tags the following tags are available. Note that each tag is
lower case
only. This is important, as xml tags are case-sensitive.

texturesliderbackgroundSpecifies the image file which should be displayed in the background of the scroll bar control.

See here for additional information about textures.

texturesliderbarSpecifies the image file which should be displayed for the scroll bar. As the size of the scroll bar is dynamic, it is often useful to

use the border attribute of this texture.
texturesliderbarfocusSpecifies the image file which should be displayed for the scroll bar when it has focus.
textureslidernibSpecifies the image file which should be displayed for the scroll bar nib. The nib is always centered within the scroll bar.
textureslidernibfocusSpecifies the image file which should be displayed for the scroll bar nib when it has focus. The nib is always centered within the scroll bar.
orientationSpecifies whether this scrollbar is horizontal or vertical. Defaults to vertical.
showonepageSpecifies whether the scrollbar will show if the container it's controlling has just one page. Defaults to true.

6.12.3
添加位于滚动条上方和下方的向上和向下按钮

     为了添加位于滚动条上方和下方的箭头按钮,你需要给窗口添加两个额外的按钮控件,并设置<onclick> tag

<onclick>pageup(id)</onclick>


    或

<onclick>pagedown(id)</onclick>


这里的 id 就是 scroll bar的id。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: