gpt4 book ai didi

extjs 3 - 在属性网格中添加进度条和图像

转载 作者:行者123 更新时间:2023-12-02 07:46:42 26 4
gpt4 key购买 nike

是否可以在 extjs 3 的属性网格中实现进度条?如何在属性网格中添加图像?

我有一个百分比值,我想在进度条中表示该值(不可编辑)。

非常感谢您的帮助。

最佳答案

你可以尝试这样的事情:

//==== Progress bar 1 ====
var pbar1 = new Ext.ProgressBar({
id:'pbar1',
width:300
});

var grid = new Ext.grid.PropertyGrid({
title: 'Properties Grid',
autoHeight: true,
width: 300,
renderTo: 'grid-ct',
bbar: pbar1, //You can set the progress bar as the property girds bottom toolbar.
customRenderers: {
Available: function(v){
return '<img src="path to image" />';
}
}, //This would render the image into the Available property.
source: {
"(name)": "My Object",
"Created": new Date(Date.parse('10/15/2006')),
"Available": false,
"Version": .01,
"Description": "A test object"
}
});

使用customRenderers渲染图像时
渲染器类型的名称应与其将渲染的属性的名称相对应有关更多信息,请参阅 API .

关于extjs 3 - 在属性网格中添加进度条和图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5973259/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com