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

标签 extjs progress-bar extjs3 propertygrid

是否可以在 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/

相关文章:

javascript - Ext JS数据转换

javascript - ExtJS 4 状态提供者

c# - 在窗口上查找特定控件

javascript - Textfield在Ext JS中无效也显示有效

Extjs 4.1 - 如何等待组合中的所有商店加载

javascript - 在 extjs 或 javascript 中将毫秒转换为时间

flutter - 在 flutter 中的 CircularProgressIndicator 上显示计时器进度

java - LibGDX 中的自定义垂直进度条

extjs - 在 ExtJs 3.3.1 中,如何在不单击 EditorGrid 的情况下显示 ComboBox 下拉列表?

ExtJS 3.4 - 设置加载