이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. ====== tabitem_width_type 속성 가이드 ====== 탭 tabitem_width_type 속성 예시 화면이다. tabitem_width_type 속성을 이용하여 탭 아이템의 너비 유형을 설정한다. tabitem_width_type 속성은 1:auto 지정시, tabitem_width 속성값은 무시되고, 탭 아이템 텍스트를 기준으로 너비가 자동으로 계산된다. tabitem_width 속성은 tabitem_width_type 속성이 0:fix인 경우에만 적용된다. 관련 속성으로 tabitem_width_type, tabitem_width, tabitem_textmargin이 있다. 관련 API로 gettabitemwidth, settabitemwidth가 있다. ===== 예시 ===== 템플릿 위치: /HTML5/COMPONENT/TAB/tab_itemwidthtype 템플릿 파일 * [[xf5projecthome>template/screen/HTML5/COMPONENT/TAB/tab_itemwidthtype.xml|tab_itemwidthtype.xml]] * [[xf5projecthome>template/screen/HTML5/COMPONENT/TAB/tab_itemwidthtype.js|tab_itemwidthtype.js]] * [[xf5projecthome>template/template.html?xframe_screen_url=/HTML5/COMPONENT/TAB/tab_itemwidthtype|새창으로 실행]] <php> echo '<html>'; echo '<iframe src="'; echo $conf['plugin']['xf5']['xf5projecthome'], 'template/template.html?'; echo 'xframe_screen_url=/HTML5/COMPONENT/TAB/tab_itemwidthtype"'; echo ' class="_xf5_iframe"'; echo ' style="'; echo $conf['plugin']['xf5']['xf5iframestyle']; echo '">'; echo '</iframe>'; echo '</html>'; </php> ==== 화면 스크립트 ==== <sxh javascript> // "settabitemwidth" 버튼 이벤트 function btn_itemwidth_on_click(objInst) { var focus_tab_index; // 선택된 탭 아이템 인데스를 구함 focus_tab_index = this.tab.gettabitemfocus(); if (focus_tab_index >= 0) { // 선택된 탭 아이템 너비 로깅 factory.consoleprint("item width = " + this.tab.gettabitemwidth(focus_tab_index)); // 선택된 탭 아이템 너비 설정 this.tab.settabitemwidth(focus_tab_index, this.fld_width.gettext()); } } // "settabitemtext" 버튼 이벤트 function btn_settabitemtext_on_click(objInst) { var focus_tab_index; // 선택된 탭 아이템 인데스를 구함 focus_tab_index = this.tab_width_auto.gettabitemfocus(); if (focus_tab_index >= 0) { // 선택된 탭 아이템 텍스트 변경 this.tab_width_auto.settabitemtext(focus_tab_index, this.tab_width_auto.gettabitemtext(focus_tab_index) + "1"); } } </sxh> guide/component/tab/tab_itemwidthtype.txt 마지막으로 수정됨: 2024/07/08 14:09저자 127.0.0.1