WebThumbnailViewer客户端对象
LEADTOOLS WebThumbnailViewer控件包括一个客户端Javascript类,用于更新服务器控件,而无需将整个页面发布回服务器。大多数WebThumbnailViewer服务器属性可以通过Javascript类访问。您可以在客户端通过使用ASP. exe访问LEADTOOLS WebThumbnailViewer控件。NET在WebForm上生成ClientID。
客户命名
该控件的客户端版本使用与服务器控件版本相同的命名约定,以便于编码。WebThumbnailViewer.js和Utilities.js中的所有Leadtools公共类定义都包含前缀“ltwf”,以避免与页面上的任何其他组件冲突。
客户端公共方法/属性
所有服务器端对象属性都可以在客户端通过两种方法访问:“GetServerPropertyName”和“SetServerPropertyName”,其中“ServerPropertyName”被替换为要访问或设置的属性的名称。
下表列出了Server属性和映射的客户端方法:
属性、方法名称(服务器) | 方法名称(客户端) | 描述 | 输入类型 |
---|---|---|---|
N/A | ID | 获取ASP.NET生成的web控件标识符。 | - |
add(url: string, firstPageIndex: integer, lastPageIndex: integer); | 控件的末尾添加一个新的缩略图元素WebThumbnailsViewer控制。 | url:字符串表示图像url。 firstPageIndex:Int表示要加载的第一个页面的基于1的索引。 lastPageIndex:Int表示要加载的最后一页的基于1的索引。必须大于或等于firstPageIndex。您可以传递-1来从firstPageIndex加载到文件的最后一页。 |
|
add(url: string, firstPageIndex: integer, lastPageIndex: integer, thumbText: string); | 控件的末尾添加一个新的缩略图元素WebThumbnailsViewer控件并指定缩略图文本。 | url:字符串表示图像url。 firstPageIndex:Int表示要加载的第一个页面的基于1的索引。 lastPageIndex:Int表示要加载的最后一页的基于1的索引。必须大于或等于firstPageIndex。您可以传递-1来从firstPageIndex加载到文件的最后一页。 thumbText:字符串表示缩略图项文本。 |
|
WebThumbnailViewer。插入(imageUrl, firstPage, lastPage, thumbIndex) |
insert(url: string, firstPageIndex: integer, lastPageIndex: integer, thumbIndex: integer); | 控件的指定索引中插入一个或多个新的缩略图元素WebThumbnailsViewer控制。 | url:字符串表示图像url。 firstPageIndex:Int表示要加载的第一个页面的基于1的索引。 lastPageIndex:Int表示要加载的最后一页的基于1的索引。必须大于或等于firstPageIndex。您可以传递-1来从firstPageIndex加载到文件的最后一页。 thumbIndex:Int表示应该插入新缩略图元素的基于0的索引。 |
WebThumbnailViewer。插入(imageUrl, firstPage, lastPage, thumbIndex, text) |
insert(url: string, firstPageIndex: integer, lastPageIndex: integer, thumbIndex: integer, thumbText: string); | 控件的指定索引中插入一个或多个新的缩略图元素WebThumbnailsViewer控件并指定缩略图文本。 | url:字符串表示图像url。 firstPageIndex:Int表示要加载的第一个页面的基于1的索引。 lastPageIndex:Int表示要加载的最后一页的基于1的索引。必须大于或等于firstPageIndex。您可以传递-1来从firstPageIndex加载到文件的最后一页。 thumbIndex:Int表示应该插入新缩略图元素的基于0的索引。 thumbText:字符串表示缩略图项文本。 |
背景色 | getBackColor():字符串 setBackColor(价值:字符串) |
获取或设置控件的背景颜色。 |
字符串表示CSS背景色。 |
BorderColor | getBorderColor():字符串 setBorderColor(价值:字符串) |
获取或设置控件的边框颜色。 |
字符串表示CSS边框颜色。 |
边框样式 | getBorderStyle():字符串 setBorderStyle(价值:字符串) |
获取或设置控件的边框样式。 |
字符串表示CSS边框样式。 |
BorderWidth | getBorderWidth (): int setBorderWidth(价值:Int) |
获取或设置web控件的边框宽度。 |
Int表示web控件的边框宽度。 |
clear () |
从WebThumbnailsViewer控件中移除所有缩略图元素。 |
- | |
列 | getColumns (): int setColumns(价值:Int) |
获取或设置缩略图的列数。 |
Int表示缩略图的列数。 |
数 | getCount (): int |
获取查看器中缩略图的数量。 |
- |
宽度 | getWidth (): int setWidth(价值:Int) |
获取或设置web控件的宽度(以像素为单位)。 |
Int表示web控件的宽度。 |
高度 | 获得():int setHeight(价值:Int) |
获取或设置web控件的高度(以像素为单位)。 |
Int表示网页控件的高度。 |
WebThumbnailViewer。HorizontalAlignMode | getHorizontalAlignMode ():ImageViewerAlignMode setHorizontalAlignMode(价值:ImageViewerAlignMode) |
获取或设置显示图像时使用的水平对齐。 |
ImageViewerAlignMode表示显示图像时使用的水平对齐。 (0-2), 0:近,1:中,2:远 |
WebThumbnailViewer。LayoutDirection | getLayoutDirection ():Leadtools.Web.Controls.LayoutDirection setLayoutDirection(价值:Leadtools.Web.Controls.LayoutDirection) |
获取或设置缩略图查看器的方向。 |
Leadtools.Web.Controls.LayoutDirection表示缩略图查看器的方向。 (0-1), 0:水平,1:垂直 |
WebThumbnailViewer。ResourcesPath | getResourcesPath ():字符串 |
获取资源(图标、脚本)所在的虚拟路径。 |
- |
WebThumbnailViewer。行 | getRows (): int setRows(价值:Int) |
获取或设置缩略图的行数。 |
Int表示缩略图的行数。 |
WebThumbnailViewer。SelectedIndex | getSelectedIndex (): int setSelectedIndex(价值:Int) |
获取或设置所选缩略图的基于0的索引。 |
Int表示所选缩略图的基于0的索引。 |
WebThumbnailViewer。SelectedThumbStyle | getSelectedThumbStyle ():ThumbnailStyle |
获取所选缩略图的样式。 |
- |
WebThumbnailViewer。GetThumbnailInfo | getThumbnailInfo ():ltwfThumbnailInfo |
获取有关特定缩略图元素的信息。 |
- |
WebThumbnailViewer。GetThumbnailText | getThumbnailText(thumbIndex: integer):字符串; |
获取特定缩略图元素的缩略图文本。 |
thumbIndex:Int表示缩略图元素的基于0的索引,从中获取其文本。 |
WebThumbnailViewer。SetThumbnailText | setThumbnailText(索引:thumbIndex, thumbText:字符串); |
为特定的缩略图元素设置缩略图文本。 |
thumbIndex:Int表示要更新的缩略图的基于0的索引。 thumbText:字符串表示新的缩略图文本。 |
WebThumbnailViewer。EnsureVisible | ensureVisible (thumbIndex:整数); |
确保指定的缩略图项在控件中可见,并在必要时滚动控件的内容。 |
thumbIndex:Int表示要滚动到视图的缩略图项的基于0的索引。 |
WebThumbnailViewer。ThumbPadding | getThumbPadding (): int setThumbPadding(价值:Int) |
获取或设置每个缩略图周围填充的像素数。 |
Int表示每个缩略图周围填充的像素数。 |
WebThumbnailViewer。ThumbsDirection | getThumbsDirection ():Leadtools.Web.Controls.ThumbnailsDirection setThumbsDirection(价值:Leadtools.Web.Controls.ThumbnailsDirection) |
获取或设置缩略图的流。 |
ThumbnailsDirection表示缩略图的流。 (0-1), 0:左:右,1:TopToBottom |
getThumbSize ():ltwfSize setThumbSize(价值:ltwfSize) |
获取或设置缩略图的大小(宽度/高度),以像素为单位。 |
ltwfSize以像素为单位表示缩略图的大小(宽度/高度)。 |
|
WebThumbnailViewer。ThumbSpacing | getThumbSpacing (): int setThumbSpacing(价值:Int) |
获取或设置每个相邻缩略图之间的像素数。 |
Int表示两个相邻缩略图之间的像素数。 |
WebThumbnailViewer。ThumbStyle | getThumbStyle ():ThumbnailStyle |
获取未选定缩略图的样式。 |
- |
工具提示 | getTooltip():字符串 setTooltip(价值:字符串) |
获取鼠标悬停在web控件上时显示的文本。 |
字符串表示鼠标悬停在web控件上时显示的文本。 |
getVerticalAlignMode ():ImageViewerAlignMode setVerticalAlignMode(价值:ImageViewerAlignMode) |
获取或设置显示图像的垂直对齐方式。 |
ImageViewerAlignMode(0-2), 0:近,1:中,2:远。 |
|
getShowItemText():布尔 setShowItemText(价值:布尔) |
获取或设置一个值,该值指示缩略图项文本是否显示在控件中。 |
如果缩略图文本显示为false,则为True。 |
|
getBrowserImageFormat():整数; |
获取要在缩略图查看器中显示的缩略图图像的格式。 |
- |
|
getViewerID():字符串 |
对象的IDWebImageViewer用于显示所选的缩略图。 |
- |
|
getInputProfile():字符串 setInputProfile(价值:字符串) |
获取或设置包含用作加载选项的编解码器选项的XML文件的url。 |
字符串包含用作加载选项的编解码器选项的XML文件的url。 |
|
getOutputProfile():字符串 setOutputProfile(价值:字符串) |
获取或设置XML文件的url,该文件包含要用作WebThumbnailViewer显示的图像的编解码器保存选项的选项。 |
字符串包含用于WebThumbnailViewer显示的图像的编解码器的选项的XML文件的url。 |
|
可见 | getVisible (): bool setVisible(价值:布尔) |
获取或设置是否在网页上显示/隐藏控件。 |
字符串表示是否显示\隐藏控件。 True表示控件;虚伪的掩饰。 |
N/A | 更新(查看器:WebImageViewer); | 根据所传递的缩略图元素的图像更新当前所选缩略图元素的图像WebImageViewer控制。 | 的客户端javascript表示WebImageViewer控制。 |
客户端公共事件
所有公共客户端Leadtools事件都可以用您自己的函数覆盖。以下示例在WebThumbnailViewer客户端对象上的SelectedIndex属性更改时显示Javascript警报。
WebThumbnailViewer1。SelectedIndexChanged = mySelectedIndexChanged;
mySelectedIndexChanged()函数
{
alert (“SelectedIndex改变!”);
}
下表列出了可以被覆盖的客户端事件:
事件名称(服务器) | 事件名称(客户端) | 提出当 |
---|---|---|
N/A |
BackColorChanged |
BackColor属性被更改。 |
N/A |
BorderColorChanged |
BorderColor属性被更改。 |
N/A |
BorderStyleChanged |
BorderStyle属性已更改。 |
N/A |
BorderWidthChanged |
更改BorderWidth属性。 |
ColumnsChanged |
Columns属性被更改。 |
|
HorizontalAlignModeChanged |
HorizontalAlignMode属性被改变。 |
|
LayoutDirectionChanged |
LayoutDirection属性被更改。 |
|
RowsChanged |
Rows属性已更改。 |
|
SelectedIndexChanged |
SelectedIndex属性被改变。 |
|
SelectedThumbStyleChanged |
SelectedThumbStyle属性被改变。 |
|
ThumbPaddingChanged |
ThumbPadding属性被更改。 |
|
ThumbsDirectionChanged |
ThumbsDirection属性被改变。 |
|
ThumbSizeChanged |
ThumbSize属性被改变。 |
|
ThumbSpacingChanged |
ThumbSpacing属性被改变。 |
|
ThumbStyleChanged |
ThumbStyle属性被改变。 |
|
VerticalAlignModeChanged |
VerticalAlignMode属性被更改。 |
|
VerticalAlignModeChanged |
VerticalAlignMode属性被更改。 |
|
N/A |
VisibleChanged |
Visible属性被改变。 |