$PBExportHeader$w_v2_testwin.srw
forward
global type w_v2_testwin from w_publ_base
end type
type cb_1 from commandbutton within w_v2_testwin
end type
type dw_1 from datawindow within w_v2_testwin
end type
end forward

global type w_v2_testwin from w_publ_base
integer width = 4283
integer height = 2556
boolean maxbox = true
boolean resizable = true
windowtype windowtype = main!
cb_1 cb_1
dw_1 dw_1
end type
global w_v2_testwin w_v2_testwin

on w_v2_testwin.create
int iCurrent
call super::create
this.cb_1=create cb_1
this.dw_1=create dw_1
iCurrent=UpperBound(this.Control)
this.Control[iCurrent+1]=this.cb_1
this.Control[iCurrent+2]=this.dw_1
end on

on w_v2_testwin.destroy
call super::destroy
destroy(this.cb_1)
destroy(this.dw_1)
end on

event open;call super::open;runtimeLog = true
end event

type cb_func from w_publ_base`cb_func within w_v2_testwin
end type

type cb_exit from w_publ_base`cb_exit within w_v2_testwin
end type

type cb_1 from commandbutton within w_v2_testwin
integer x = 1504
integer y = 1808
integer width = 457
integer height = 128
integer taborder = 50
boolean bringtotop = true
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "none"
end type

event clicked;s_v2_dw_parms ls_parms
ls_parms.arg_dw = dw_1
ls_parms.arg_colname = 'strcol'
ls_parms.arg_row = dw_1.getrow()

openwithparm(w_v2_dw_filter_rsp, ls_parms)
end event

type dw_1 from datawindow within w_v2_testwin
integer x = 215
integer y = 228
integer width = 2080
integer height = 1112
integer taborder = 20
string title = "none"
string dataobject = "dw_v2_testwin"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

event rowfocuschanged;This.SelectRow(0, False)
IF This.GetRow() > 0 THEN
	This.SelectRow(This.GetRow(), True)
END IF

end event

event rbuttondown;string ls_dwoname, ls_dwotype

ls_dwoname = trim(lower(dwo.name))
ls_dwotype = trim(lower(dwo.type))

s_v2_dw_parms s_parms
s_parms.arg_colname = ''

if row > 0 AND (ls_dwotype = 'column' OR ls_dwotype = 'compute') then
	s_parms.arg_dw = this
	s_parms.arg_colname = ls_dwoname
	s_parms.arg_row = row
elseif right(ls_dwoname,2) = '_t' then
	ls_dwoname = left(ls_dwoname, len(ls_dwoname) - 2)
	ls_dwotype = trim(lower(this.Describe(ls_dwoname+".type")))
	if ls_dwotype = 'column' OR ls_dwotype = 'compute' then
		s_parms.arg_dw = this
		s_parms.arg_colname = ls_dwoname
		s_parms.arg_row = 0
	end if
end if

if s_parms.arg_colname = '' then
	this.SetFilter('')
	this.Filter()
else
	openwithparm(w_v2_dw_filter_rsp, s_parms)
end if

end event

