翻譯|使用教程|編輯:秦林|2022-11-17 10:35:17.917|閱讀 388 次
概述:本文繼續給大家講解在使用DHTMLX Gantt時,如何使用燈箱元素,歡迎大家下載最新版試用體驗。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
本文繼續給大家講解在使用DHTMLX Gantt時,如何使用燈箱元素,歡迎大家下載最新版試用體驗。
要使某個章節對特定事件隱藏,重定義它的set_value方法如下:
gantt.form_blocks.textarea.set_value=function(node,value,ev){ node.firstChild.value=value||""; var style = ev.some_property?"":"none"; node.style.display=style; // editor area node.previousSibling.style.display=style; //section header gantt.resizeLightbox(); //correct size of lightbox }
通過設置wide_form配置選項為true,你可以將lightbox的部分與它們的標簽放在同一行上:
gantt.config.wide_form = true; gantt.locale.labels.section_priority = "Priority"; gantt.locale.labels.section_status = "Status"; gantt.config.lightbox.sections = [ {name: "description", height: 38, map_to: "text", type: "textarea", focus: true}, {name: "status", height:22, map_to: "status", type: "select", options: [ {key:1, label: "New"}, {key:2, label: "Open"}, {key:3, label: "Done"} ]}, {name: "priority", map_to: "priority", type: "radio", options: [ {key: 1, label: "High"}, {key: 2, label: "Normal"}, {key: 3, label: "Low"}, ]}, {name: "time", type: "duration", map_to: "auto"} ]; gantt.init("gantt_here");
可以在section頭中設置一個自定義按鈕。按以下步驟向section的頭部添加按鈕:
在section對象中指定button屬性:
{name:"description", height:130, map_to:"text", type:"textarea", button:"help"}
為按鈕設置標簽:
//'help' is the value of the 'button' property gantt.locale.labels.button_help="Help label";
指定按鈕點擊的處理程序:
gantt.form_blocks.textarea.button_click = function(index,button,shead,sbody){ // any custom logic }
設置地址:
你可以通過下面的CSS類來定義按鈕的圖像:
.dhx_custom_button_help{ background-image:url(imgs/but_help.gif); }
DHTMLX Gantt享有超十年聲譽,支持跨瀏覽器和跨平臺,性價比高,可滿足項目管理控件應用的所有需求,是最完善的甘特圖圖表庫。慧都2022年終狂歡火熱進行中,知名軟控件產品享超低折扣,滿額豪禮贈,復購雙重大禮!了解更多內容,歡迎在線咨詢或者私信我獲取正版試用版及報價。
甘特圖控件交流群:764148812 歡迎進群交流討論
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn