테이블뷰 » Api

createobjectex

Description

오브젝트를 동적으로 생성하는 API이다.

Parameters

Parameters Type Description
nRowIndex long 행 인덱스 (Zero-Based)
nColumnIndex long 열 인덱스 (Zero-Based)
nObjectKind short 생성할 오브젝트 종류
objProp class 오브젝트 속성 클래스

Return Value

Type Description
INSTANCE 생성된 오브젝의 Instance

Remark

** nObjectKind 상수값

XFD_CTRLKIND_FIELD_NORMAL = 100
XFD_CTRLKIND_FIELD_NUMERIC = 101
XFD_CTRLKIND_FIELD_HANGUL = 102
XFD_CTRLKIND_FIELD_PASSWORD = 103

이외의 nObjectKind 상수값은 getcontrolkind 함수의 도움말을 참조한다.

버튼을 생성할 경우, style_class 속성이 0이 아닌 경우, 내부에 미리 지정된 속성이 적용되어, objProp 파라미터에 지정한 일부 속성이 적용되지 않는다.

Example

function btn_createobjectex_on_mouseup(objInst) { var objProp = { x: 10, y: 20, width: 200, height: 30, text: "New Button", fore_color: "00FF0000", on_mouseup: "btn_menubutton_on_mouseup" }; var instNewObj = tableview.createobjectex(0, 0, XFD_CTRLKIND_PUSHBUTTON, objProp); if(instNewObj != null) { factory.consoleprint("-->> create success"); } else { factory.consoleprint("-->> create fail.."); } } // 동적 생성된 메뉴 버튼에 대한 mouseup 이벤트 함수 function btn_menubutton_on_mouseup(objInst) { screen.alert(objInst.gettext()); }

See Also

createobject
createshape
createshapeex

Viewer Ver.

9.1.1.1

Update Date

20210402