H
handsome1234
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,comctrls,filectrl,extctrls;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
left1,left2:integer;
split:TSplitter;
dirs: TdirectoryListbox;
files: TFileListBox;
begin
dirs:=TdirectoryListbox.create(Form1);
dirs.Parent:=Form1;
dirs.align:=alLeft;
split:=TSplitter.Create(Form1);
split.parent:=Form1;
left1:=Form1.left
left2:=dirs.left;
//当断点指向下一行时,即时显示left2=3,
//为什么按了f7后(split.left:=dirs.left+dirs.Width+1;这句被执行后,),
dirs.left由原来得3变成了0了?????
//我觉得起码应该保持一致啊,而刚刚执行得语句又没有给dirs.left赋值
split.left:=dirs.left+dirs.Width+1;
并且此时dirs.Width即时为145,加上后面得“1”;应该为146;
可是即时鼠标指向为145;奇怪????
split.Align:=dirs.Align;
Split.minsize:=Form1.clientwidth div 4;
files:=TFileListBox.create(form1);
files.Parent:=form1;
files.align:=alclient;
dirs.filelist:=files;
end;
end.
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,comctrls,filectrl,extctrls;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
left1,left2:integer;
split:TSplitter;
dirs: TdirectoryListbox;
files: TFileListBox;
begin
dirs:=TdirectoryListbox.create(Form1);
dirs.Parent:=Form1;
dirs.align:=alLeft;
split:=TSplitter.Create(Form1);
split.parent:=Form1;
left1:=Form1.left
left2:=dirs.left;
//当断点指向下一行时,即时显示left2=3,
//为什么按了f7后(split.left:=dirs.left+dirs.Width+1;这句被执行后,),
dirs.left由原来得3变成了0了?????
//我觉得起码应该保持一致啊,而刚刚执行得语句又没有给dirs.left赋值
split.left:=dirs.left+dirs.Width+1;
并且此时dirs.Width即时为145,加上后面得“1”;应该为146;
可是即时鼠标指向为145;奇怪????
split.Align:=dirs.Align;
Split.minsize:=Form1.clientwidth div 4;
files:=TFileListBox.create(form1);
files.Parent:=form1;
files.align:=alclient;
dirs.filelist:=files;
end;
end.