翻譯|使用教程|編輯:秦林|2022-11-17 10:35:17.917|閱讀 388 次
概述:本文繼續(xù)給大家講解在使用DHTMLX Gantt時(shí),如何使用燈箱元素,歡迎大家下載最新版試用體驗(yàn)。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
本文繼續(xù)給大家講解在使用DHTMLX Gantt時(shí),如何使用燈箱元素,歡迎大家下載最新版試用體驗(yàn)。
要使某個(gè)章節(jié)對(duì)特定事件隱藏,重定義它的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 }
通過(guò)設(shè)置wide_form配置選項(xiàng)為true,你可以將lightbox的部分與它們的標(biāo)簽放在同一行上:
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頭中設(shè)置一個(gè)自定義按鈕。按以下步驟向section的頭部添加按鈕:
在section對(duì)象中指定button屬性:
{name:"description", height:130, map_to:"text", type:"textarea", button:"help"}
為按鈕設(shè)置標(biāo)簽:
//'help' is the value of the 'button' property gantt.locale.labels.button_help="Help label";
指定按鈕點(diǎn)擊的處理程序:
gantt.form_blocks.textarea.button_click = function(index,button,shead,sbody){ // any custom logic }
設(shè)置地址:
你可以通過(guò)下面的CSS類來(lái)定義按鈕的圖像:
.dhx_custom_button_help{ background-image:url(imgs/but_help.gif); }
DHTMLX Gantt享有超十年聲譽(yù),支持跨瀏覽器和跨平臺(tái),性價(jià)比高,可滿足項(xiàng)目管理控件應(yīng)用的所有需求,是最完善的甘特圖圖表庫(kù)。慧都2022年終狂歡火熱進(jìn)行中,知名軟控件產(chǎn)品享超低折扣,滿額豪禮贈(zèng),復(fù)購(gòu)雙重大禮!了解更多內(nèi)容,歡迎在線咨詢或者私信我獲取正版試用版及報(bào)價(jià)。
甘特圖控件交流群:764148812 歡迎進(jìn)群交流討論
慧都年終狂歡季,全場(chǎng)產(chǎn)品,限時(shí)特惠,立即了解詳情!
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn