컴포넌트의 input_type 속성값을 반환하는 API이다.
Type | Description |
---|---|
short | input_type 속성값 (0:선택, 1:필수, 2:잠금, 3:잠금+필수) |
function btn_getinputindex_on_mouseup()
{
var ret, input_type;
input_type = fld_inputtype.getinputtype();
factory.consoleprint("getinputtype return = " + input_type);
switch(input_type) {
case 0:
factory.consoleprint("input_type = " + input_type + ", 선택");
break;
case 1:
factory.consoleprint("input_type = " + input_type + ", 필수");
break;
case 2:
factory.consoleprint("input_type = " + input_type + ", 잠금");
break;
case 3:
factory.consoleprint("input_type = " + input_type + ", 잠금+필수");
break;
}
// 입력 방식인 "선택"인 경우, "잠금"으로 변경
if (input_type == 0) {
ret = fld_inputtype.setinputtype(2);
}
// 입력 방식인 "잠금"인 경우, "선택"으로 변경
else if (input_type == 2) {
ret = fld_inputtype.setinputtype(0);
}
factory.consoleprint("setinputtype return = " + ret);
}