콤보박스 » Api

setselectedindexex

Description

해당하는 인덱스의 콤보박스 아이템을 선택하면서 콤보박스에 on_itemchange 이벤트가 설정되어 있을 때 이벤트를 실행할지 여부와 실행 시 Async 여부를 설정할 수 있는 API이다.

Parameters

Parameters Type Description
nIndex short 선택할 아이템의 인덱스
bFireItemChangeEvent BOOL on_itemchange 이벤트를 실행할지 여부
bProcEventAsync BOOL 이벤트 실행시 Async로 실행할지 여부
nIndexType short [옵션]인덱스 타입(0:데이터 기준(기본값), 1:Display 기준)
bSet BOOL [옵션] 선택 처리 여부 (기본값: true)
bAllowHiddenCode BOOL [옵션] 숨겨진 코드 선택 허용 여부 (기본값: true)

Return Value

Type Description
void 없음

Remark

setselectedindex 와 다른 점은 코드 설정 시에 체인지 이벤트 발생여부를 설정할 수 있으며, 이벤트도 Async로 실행할지 설정 가능하다.

bSet 파라미터 값을 false로 지정한 경우, 선택 해제 처리가 수행된다.

Example

function btn_setselectedindexex_on_mouseup() { cbTest.setselectedindexex(1, true, true); } function cbTest_on_itemchange(nprev_item, ncur_item) { factory.consoleprint("선택된 아이템 " + ncur_item); } function btn_setselectedindexex2_on_mouseup() { // 첫번째 아이템 필터링 cbTest.setpicklistfilter("code,>,1"); // 화면상 첫번째 항목 선택 cbTest.setselectedindexex(0, true, true, 1); }

See Also

setselectedindex

Viewer Ver.

9.1.1.1

Update Date

20230112