我的form1中有pageframe1,她有10個選項卡,分別是 page1,page2....page10;每個選項卡中又有一個表格grid1,我想通過grid1的右鍵選單,來控制表格的添加資料,洗掉資料等操作。只做一個右鍵選單。我的在每個選項卡中的grid1中rightclick事件中寫到:Do menu\youjian.mpr。
請問題具體的右鍵選單要怎么寫呢。
我想是在右鍵選單中做出判斷哪個選項卡是處于激活狀態的。如:
右鍵的添加資料功能:
if thisform.pageform1.activate=1
SELECT zonghejia
thisform.pageform1.page1.grid1.setfocus
GO bottom
thisform.pageform1.page1.grid1.readonly=.f.
thisform.pageform1.page1.grid1.AllowCellSelection=.t.
APPEND BLANK
endif
if thisform.pageform1.activate=2
SELECT zonghejia
thisform.pageform1.page2.grid1.setfocus
GO bottom
thisform.pageform1.page2.grid1.readonly=.f.
thisform.pageform1.page2.grid1.AllowCellSelection=.t.
APPEND BLANK
endif
...........
if thisform.pageform1.activate=10
SELECT zonghejia
thisform.pageform1.page10.grid1.setfocus
GO bottom
thisform.pageform1.page10.grid1.readonly=.f.
thisform.pageform1.page10.grid1.AllowCellSelection=.t.
APPEND BLANK
endif
請問下還有沒有更簡便的方法。非常感謝。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/23200.html
標籤:VFP
