onColumnResize

当用户拖动列边界调整列宽时触发

void onColumnResize(number index,GridColumn column,number new_width);
indexnumber列的索引
columnGridColumn列对象本身
new_widthnumber列的新宽度

Available only in PRO Edition

Example

gantt.attachEvent("onColumnResize", function(index, column, new_width){
    if(!message){
        message = gantt.message({expire:-1,
        text:`<b>${gantt.locale.labels["column_"+column.name]}
        </b> 现在宽度为 <b id='width_placeholder'></b><b>px</b>`});
    }
    document.getElementById("width_placeholder").innerText = new_width
});

Related samples

Details

此功能仅在 PRO 版本中可用。

See also
Back to top