트리메뉴 » Api

getitemdepth

Description

트리메뉴의 특정아이템의 Depth정보를 반환하는 API이다.

Parameters

Parameters Type Description
nIndex short 아이템 인덱스
bBaseRoot BOOL [옵션] 루트메뉴 기준 여부(기본값:false)

Return Value

Type Description
short Depth정보

Remark

bBaseRoot 파라미터를 false로 지정시, 연결된 XDataSet의 Depth정보를 그대로 반환한다.
bBaseRoot 파라미터를 true로 지정시, 루트메뉴를 기준으로 한 실제 Depth정보를 반환한다.

Example

function test_on_mouseup(objInst) { if (treemenu01.getitemdepth(0) == 0) { // 루트메뉴이면 배경색을 빨강색처리 treemenu01.setitemcolor(index, factory.rgb(255,0,0), null, null); else { // 루트메뉴가 아니면 배경색을 파랑색처리 treemenu01.setitemcolor(index, factory.rgb(0,0,255), null, null); } }

Viewer Ver.

9.1.1.1

Update Date

20240514