UI \剑道\ \ DropDownButton
Kendo UI的PHP包装器DropDownButton.
继承自UI \剑道\ \小部件.
使用
要在PHP页面中使用DropDownButton实例化一个新实例,请通过可用配置对其进行配置方法然后输出回声
的结果渲染方法。
使用剑道下拉按钮
<?php //创建一个新的DropDownButton实例,并指定它的id $ DropDownButton = new \Kendo\UI\DropDownButton('DropDownButton');//配置$dropDownButton->enabled(true) //输出它echo $dropDownButton->render();? >
方法
点击
当下拉按钮或项目被鼠标点击,触控设备,或当下拉按钮或项目被聚焦时按下ENTER(或空格)时触发。有关更多信息,请查看点击活动文档。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串| \剑道\ JavaScriptFunction
示例-使用字符串定义JavaScript函数
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$dropDownButton->点击('函数(e) {}');? >
示例-使用字符串定义JavaScript名称
点击(onClick);? >
示例-使用\Kendo\JavaScriptFunction
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$dropDownButton->点击(新的\Kendo\JavaScriptFunction('函数(e) {}'));? >
关闭
关闭菜单按钮时触发。有关更多信息,请查看关闭活动文档。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串| \剑道\ JavaScriptFunction
示例-使用字符串定义JavaScript函数
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$dropDownButton->close('函数(e) {}');? >
示例-使用字符串定义JavaScript名称
关闭(“onClose”);? >
示例-使用\Kendo\JavaScriptFunction
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$dropDownButton->close(new \Kendo\JavaScriptFunction('function(e) {}'));? >
启用
指示下拉按钮是否应启用或禁用。默认情况下,它是启用的,除非检测到disabled="disabled"属性。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值布尔
例子
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');dropDownButton - >启用(真正的);? >
fillMode
设置控制颜色应用方式的值。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串
例子
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');dropDownButton - > fillMode(“价值”);? >
图标
定义剑道UI主题精灵中现有图标的名称。该图标将应用于下拉按钮内的span元素的背景图像。span元素可以由小部件自动添加,如果应用了k-icon CSS类,则可以使用现有元素。有关可用图标名称的列表,请参考图标演示。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串
例子
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');dropDownButton - >图标(“价值”);? >
iconClass
定义一个CSS类(或多个用空格分隔的类),它们应用于DropDownButton内的span元素。允许使用自定义图标。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串
例子
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');dropDownButton - > iconClass(“价值”);? >
imageUrl
定义一个URL,它将用于下拉按钮内的img元素。URL可以是相对的,也可以是绝对的。如果它是相对的,它将被评估与网页URL的关系。img元素可以由小部件自动添加,如果应用了k-image CSS类,也可以使用现有元素。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串
例子
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');dropDownButton - > imageUrl(“价值”);? >
itemTemplate
为菜单项指定自定义模板。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串| \剑道\ JavaScriptFunction
示例-使用字符串
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');dropDownButton - > itemTemplate(“价值”);? >
示例-使用\Kendo\JavaScriptFunction
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$dropDownButton->itemTemplate(新的\Kendo\JavaScriptFunction('function() {}'));? >
addItem
添加一个或多个下拉按钮到下拉按钮。
返回
UI \剑道\ \ DropDownButton
参数
$value[, $value2,…]UI \剑道\ \ DropDownButtonItem |数组
示例-使用\Kendo\UI\DropDownButtonItem
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$item = new \Kendo\UI\DropDownButtonItem();$enabled = true;启用项目- >使美元($);dropDownButton - > addItem美元($ item);? >
示例-使用数组
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$enabled = true;$dropDownButton->addItem(数组('enabled' => $enabled))? >
示例-添加多个DropDownButtonItem
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$first = new \Kendo\UI\DropDownButtonItem();$second = new \Kendo\UI\DropDownButtonItem();dropDownButton - > addItem(第一,第二美元);? >
消息
允许对小部件中使用的字符串进行本地化。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值UI \剑道\ \ DropDownButtonMessages |数组
示例-使用UI \剑道\ \ DropDownButtonMessages
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$messages = new \Kendo\UI\DropDownButtonMessages();$labelSuffix = 'value';信息- > labelSuffix ($ labelSuffix);dropDownButton - >消息(消息);? >
示例-使用数组
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$labelSuffix = 'value';$dropDownButton->消息(数组('labelSuffix' => $labelSuffix));? >
开放
打开菜单按钮时触发。有关更多信息,请查看开放活动文档。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串| \剑道\ JavaScriptFunction
示例-使用字符串定义JavaScript函数
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$dropDownButton->open('函数(e) {}');? >
示例-使用字符串定义JavaScript名称
打开(“onOpen”);? >
示例-使用\Kendo\JavaScriptFunction
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$dropDownButton->open(new \Kendo\JavaScriptFunction('function(e) {}'));? >
弹出
将用于弹出式初始化的选项。有关可用选项的更多详细信息,请参阅Popup文档。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值UI \剑道\ \ DropDownButtonPopup |数组
示例-使用UI \剑道\ \ DropDownButtonPopup
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$popup = new \Kendo\UI\DropDownButtonPopup();$appendTo = 'value';弹出- > appendTo ($ appendTo);dropDownButton - >弹出(弹出);? >
示例-使用数组
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');$appendTo = 'value';$dropDownButton->弹出(数组('appendTo' => $appendTo));? >
圆形的
设置控制边界半径的值。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串
例子
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');dropDownButton - >圆角(“价值”);? >
大小
设置组件的大小。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串
例子
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');dropDownButton - >大小(“价值”);? >
spriteCssClass
定义一个CSS类(或多个用空格分隔的类),用于将背景图像应用到下拉按钮内的span元素。如果你想使用Kendo UI主题精灵背景图像中的图标,使用icon属性更容易。span元素可以由小部件自动添加,如果应用了k-sprite CSS类,也可以使用现有元素。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串
例子
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');dropDownButton - > spriteCssClass(“价值”);? >
themeColor
根据应用的主题设置组件的颜色。
返回
UI \剑道\ \ DropDownButton
参数
美元的价值字符串
例子
<?php $dropDownButton = new \Kendo\UI\ dropDownButton (' dropDownButton ');dropDownButton - > themeColor(“价值”);? >