관리 메뉴

why don't do your best

parent 찾는 스크립트 _ 정리안됨. 본문

Programming/PowerBuilder

parent 찾는 스크립트 _ 정리안됨.

빅셔 2012. 2. 8. 16:08

 

정리하기도 귀찮음.. 그냥 소스에서 찾아서 처리….

 

graphicobject lgo_temp
tab tab_
boolean lb_value = TRUE


st_1.text = gf_ap_dbcol(st_1.text)

lgo_temp = parent

//첫번째에서 windows나 탭을찾으면 스탑
IF  lgo_temp.Typeof() = Window! OR lgo_temp.Typeof() = Tab! THEN lb_value = FALSE


DO WHILE lb_value
    lgo_temp = lgo_temp.GetParent()
    IF lgo_temp.Typeof() = Window! THEN
            lb_value = FALSE
    END IF
    IF lgo_temp.Typeof() = Tab! THEN
            lb_value = FALSE
    END IF
LOOP

//IF lgo_temp.Typeof() = Window! THEN MESSAGEBOX('','윈도우')
//IF lgo_temp.Typeof() = Tab! THEN MESSAGEBOX('','탭')


CHOOSE CASE lgo_temp.Typeof()
    CASE Tab!
        tab_ = lgo_temp
        sle_cd1.ii_x = tab_.x + this.x  + 20 + sle_cd1.x
        sle_cd1.ii_y = tab_.y + this.y + 85  + this.height
       
       
        sle_cd2.ii_x = tab_.x + this.x + sle_cd2.x
        sle_cd2.ii_y = tab_.y + this.y + 100 + this.height

    CASE Window!
       
        sle_cd1.ii_x = this.x + sle_cd1.x
        sle_cd1.ii_y = this.y + this.height
       
        sle_cd2.ii_x = this.x + sle_cd2.x
        sle_cd2.ii_y = this.y + this.height
END CHOOSE

Comments