全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1131
推到 Plurk!
推到 Facebook!

About OnCalcFields Event

尚未結案
marker
一般會員


發表:9
回覆:5
積分:2
註冊:2004-11-05

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-04-13 19:01:01 IP:210.177.xxx.xxx 未訂閱
Hi all, I have an application that connect to a database. I have a form A which contain some DB control component such as TQuery, TDBGrid, TDBEdit, etc. I have a TQuery object B which have defined OnCalcFields event so that some Fields can be updated automatically according to some conditions. The life cycle of A is shown as follows: 1. User input some searching options in MainForm 2. Create form A but don't show it yet 3. Set Filter and other initial conditions in FormCreate 4. Prepare values used in the form in the OnCalcFields, 5. Call A.ShowModal I have trace the program and found that after ShowModal, OnCalcFields is automatically trigger again and loop through the result set. This induced some displaying errors in A. I just want to ask is it normal in Delphi that onCalcFields will be triggered by showModal? Thanks for any reply Mark Leung
G01
高階會員


發表:249
回覆:379
積分:215
註冊:2002-05-21

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-04-13 20:29:43 IP:61.64.xxx.xxx 未訂閱
The onCalcFields Event is triggered after the TDataSet Child class component Opened (ex: .Active := TRUE; or .Open; )
系統時間:2024-07-01 9:22:07
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!