VFP 愛用者社區 首頁 VFP 愛用者社區
本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
 
 常見問題常見問題   搜尋搜尋   會員列表會員列表   會員群組會員群組   會員註冊會員註冊 
 個人資料個人資料   登入檢查您的私人訊息登入檢查您的私人訊息   登入登入

微軟已承認的 VFP9 Grid Bug 的解決方案

 
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區
上一篇主題 :: 下一篇主題  
發表人 內容
朱育興



註冊時間: 2003-08-25
文章: 661
來自: 台中市大里區

第 1 樓

發表發表於: 星期二 六月 20, 2006 11:39 am    文章主題: 微軟已承認的 VFP9 Grid Bug 的解決方案 引言回覆

A grid on a parent form may be blank in a Visual FoxPro 9.0-based application
在父表單上的一個多筆編輯控制項可能在以 Visual FoxPro 9.0 為基礎的應用程式中是空白。


SYMPTOMS
問題

In a Microsoft Visual FoxPro 9.0-based application, a grid on a parent form may be blank.
在一個以 Microsoft Visual FoxPro 9.0 為基礎的應用程式中,在父表單上的一個多筆編輯控制項可能是空白。

This problem occurs when the following conditions are true:
當下列的條件為真的時候,會發生這個問題:

• You upgrade the application to Visual FoxPro 9.0.
• 您將應用程式升級到 Visual FoxPro 9.0。

• The application has a parent form that has page frames, and the page frames contain a grid.
• 應用程式有一個具有分頁框的父表單,而且該分頁框含有一個多筆編輯控制項。

• You either close the child form or resize the form.
• 關閉子表單或重定表單的大小。


CAUSE
原因

This problem may occur when the grid columns have functions or when you run the ControlSource method on the child form, and the child form does not redraw the grid correctly.
當多筆編輯控制項直欄有函數或者當您在子表單上執行 ControlSource 方法程序,以及子表單不正確地重繪多筆編輯控制項的時候,這一個問題可能發生。


WORKAROUND
解決方法

To work around this problem, follow these steps:
若要解決這個問題,請遵循這些步驟:

1. Redraw the grid after the child form is closed to add a GridRefresh() method to the grid class. To do this, use code that is similar to the following.
1. 在子表單被關閉之後重繪多筆編輯控制項,把 GridRefresh() 方法程序加入到多筆編輯控制項類別中。若要這樣做,請使用類似於下列的程式碼。

local lnSaveLockScreen
lnSaveLockScreen = ThisForm.LockScreen
ThisForm.LockScreen = .t.
This.Refresh()
ThisForm.LockScreen = lnSaveLockScreen

2. Bind both the form activate event and the form resize event to the grid.Init method by using code that is similar to the following.
2. 藉由使用類似於下列的程式碼,將表單的 Activate 事件與 Resize 事件一起連結到多筆編輯控制項的 Init 事件中。

BindEvent(thisform, "activate", this, "gridrefresh",1)
BindEvent(thisform, "resize", this, "gridrefresh",1)

_________________
希望有更多人來參與
VFP wiki - 需要大家一起完成的VFP電子書與FAQ
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件 MSN Messenger
從之前的文章開始顯示:   
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區 所有的時間均為 台北時間 (GMT + 8 小時)
1頁(共1頁)

 
前往:  
無法 在這個版面發表文章
無法 在這個版面回覆文章
無法 在這個版面編輯文章
無法 在這個版面刪除文章
無法 在這個版面進行投票
無法 在這個版面附加檔案
無法 在這個版面下載檔案


Powered by phpBB © 2001, 2005 phpBB Group
正體中文語系由 phpbb-tw 維護製作