X xzb_97 Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-30 #1 我用scrollbar移动一个EDIT控件,控制它从form的左边起始端移动到右边顶端,该怎么写啊???
Y ysp娃娃 Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-30 #3 procedure TForm1.FormCreate(Sender: TObject); begin Scrollbar1.Min:= 0; Scrollbar1.Max:= Self.ClientWidth - Button1.Width; Scrollbar1.Position:= Button1.Left; end; procedure TForm1.ScrollBar1Change(Sender: TObject); begin Button1.Left:= Scrollbar1.Position; end;
procedure TForm1.FormCreate(Sender: TObject); begin Scrollbar1.Min:= 0; Scrollbar1.Max:= Self.ClientWidth - Button1.Width; Scrollbar1.Position:= Button1.Left; end; procedure TForm1.ScrollBar1Change(Sender: TObject); begin Button1.Left:= Scrollbar1.Position; end;