본문 바로가기

컴퓨터/파워빌더

파워빌더 - 데이터윈도우 필드 배경색 설정

데이터윈도우에 자료를 입력할때  필드이동시  background color 를 지정하여 현재 어느필드에 포커스가 주어졌는지 알아보기 쉽게 하는 팁입니다...
















// Instance Variables 
string is_col_pre, is_col_cur


//데이터윈도우의  itemfocuschanged  이벤트
is_col_cur = this.GetColumnName()
if is_col_pre <> '' then
    this.modify( is_col_pre + ".background.Color=~"0~tIf(CurrentRow() = " &
        + "getrow(),RGB(255,255,255),RGB( 255, 255, 255 ))~"" )
end if

this.modify( is_col_cur + ".background.Color=~"0~tIf(CurrentRow() = " &
        + "getrow(),RGB(230,231,255),RGB( 255, 255, 255 ))~"" )
this.setcolumn(is_col_cur)
is_col_pre = is_col_cur