트리메뉴 » Api

setitemcolor

Description

트리메뉴의 특정아이템의 색상을 지정하는 API이다.
아이템의 배경색, 전경색, 보더색상을 지정할 수 있다.

Parameters

Parameters Type Description
nIndex short 아이템 인덱스
clrBackColor COLOR 배경색
clrForeColor COLOR 전경색
clrBorderColor COLOR 보더색

Return Value

Type Description
BOOL 정상 처리 여부

Remark

값이 null인 경우, 해당속성은 변경하지 않는다.

Example

function treemenu01_on_itemclick(objInst, index, depth, type) { // 배경색과 보더색 변경 treemenu01.setitemcolor(index, factory.rgb(100,0,0), null, factory.rgb(0,100,0)); // 글꼴을 굵게 기울임으로 변경 treemenu01.setitemfont(index, null, null, true, true); // childbox_backcolor 변경 treemenu01.setitemchildboxcolor(index, factory.rgb(200,0,0)); // childpanel_backcolor, childpanel_bordercolor 변경 treemenu01.setitemchildpanelcolor(index, factory.rgb(155,0,0), factory.rgb(155,155,155)); }

See Also

setitemfont
setitemchildboxcolor
setitemchildpanelcolor
inititemprop

Viewer Ver.

9.1.1.1

Update Date

20211208