

我想在這個視窗里面選擇了之后在后面個視窗里面的資料視窗顯示了的內容與前一個視窗所選的相關
uj5u.com熱心網友回復:
在后面的視窗里寫個函式切換顯示,在前面的視窗里選擇之后呼叫這個函式uj5u.com熱心網友回復:
openwithparm(window,string)uj5u.com熱心網友回復:
這個要學習視窗的遍歷與視窗控制元件的遍歷,把對應的實體給找出來,就可以了之所以要遍歷,是因為pb沒有辦法知道這些內容的句柄,只能通過名稱來遍歷,當控制元件的classname()跟你想要的一致時,就回傳.例如,要在某視窗找指定名稱的文本控制元件
global type f_find_st from function_object
end type
forward prototypes
global function statictext f_find_st (ref window aw_win, string as_name)
end prototypes
global function statictext f_find_st (ref window aw_win, string as_name);//遍歷控制元件,找到同名的
long i,ll_rc
statictext rn
ll_rc = upperbound(aw_win.control)
for i = 1 to ll_rc
if aw_win.control[i].classname()=as_name then
rn = aw_win.control[i]
exit
end if
next
return rn
end function
那么,在使用時就很簡單了
statictext lst_tmp
lst_tmp = f_find_st(w_rep_xxx,'st_shop')
接下來就可以對lst_tmp進行各種操作了
uj5u.com熱心網友回復:
用openwithparm來打開后一個視窗,并且把引數傳遞過去string ls_data
ls_data = "aaaa"
openwithparm(w_2, ls_data)
uj5u.com熱心網友回復:
樓上版主正解uj5u.com熱心網友回復:
w_1 傳遞引數 openwithparm(w_2,ls_type)w_2 接受引數 ls_type = message.stringparm
uj5u.com熱心網友回復:
果然不錯,就是這樣弄轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/16425.html
標籤:腳本語言
