請問如果我動態產生物件?? |
尚未結案
|
shing.net
中階會員 發表:207 回覆:124 積分:66 註冊:2002-03-16 發送簡訊給我 |
|
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
|
shing.net
中階會員 發表:207 回覆:124 積分:66 註冊:2002-03-16 發送簡訊給我 |
|
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
|
shing.net
中階會員 發表:207 回覆:124 積分:66 註冊:2002-03-16 發送簡訊給我 |
引言: I have created a simple test program using Delphi 7 and found no problem, i.e. can change focus to the next control. Could you please give more details on your application?我的Form是直接讀*.dfm其為對應*.pas因為其dfm有其Taborder之屬性 合理應可執行才對,因為按Tab鍵可以,為何用 Enter不行 |
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
Here is my test program. I have tried changing TabOrder of Edit7 and Edit8 and found no problem < class="code">unit Unit1; interface uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls; type
TForm1 = class(TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
Edit7: TEdit;
Edit8: TEdit;
public
{ Public declarations }
end; var
Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if Key=#13 then begin
key := #0;
perform(WM_NEXTDLGCTL, 0, 0);
end;
end; procedure TForm1.FormCreate(Sender: TObject);
begin
Edit7:= TEdit.Create(self);
Edit8:= TEdit.Create(self);
with Edit7 do begin
Parent := TabSheet2;
Left := Edit4.Left;
Top := Edit4.Top 20;
OnKeyPress := Edit1KeyPress;
end;
with Edit8 do begin
Parent := TabSheet2;
Left := Edit4.Left;
Top := Edit4.Top 40;
OnKeyPress := Edit1KeyPress;
end;
end; procedure TForm1.FormDestroy(Sender: TObject);
begin
Edit7.Free;
Edit8.Free;
end; end.
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |