본문 바로가기
프로그래밍/파워빌더

파워빌더 dw 데이터 윈도우 컬럼이동이 자동 한글 변환

by 젤리씨 2023. 1. 20.
728x90

데이터 윈도우의 itemfocuschanged 에서

 

//---------------------------------------------------------------------------//
//        Focus 이동 시점에서 명 입력 항목인 경우 한글 처리한다.             //
//---------------------------------------------------------------------------//

	This.SelectText(1 , Len( GetText()) + 3 ) ;
	
   Choose Case This.GetColumnName()
	Case   '컬럼명' ; ImmSetConversionStatus(ImmGetContext(handle(this))  , 1, 0)  // 한글자판변환
	Case Else       ; ImmSetConversionStatus(ImmGetContext(handle(this))  , 0, 0)  // 영자판변환
   End Choose

//---------------------------------------------------------------------------//

위와 같이 넣고 컬럼명을 바꾸면 된다

 

만약에 컬럼이 2개이상이라면 아래처럼 쓰면 된다

 

//---------------------------------------------------------------------------//
//        Focus 이동 시점에서 명 입력 항목인 경우 한글 처리한다.             //
//---------------------------------------------------------------------------//

	This.SelectText(1 , Len( GetText()) + 3 ) ;
	
   Choose Case This.GetColumnName()
	Case   '컬럼1','컬럼2' ; ImmSetConversionStatus(ImmGetContext(handle(this))  , 1, 0)  // 한글자판변환
	Case Else       ; ImmSetConversionStatus(ImmGetContext(handle(this))  , 0, 0)  // 영자판변환
   End Choose

//---------------------------------------------------------------------------//
728x90

댓글