K kusanagi Unregistered / Unconfirmed GUEST, unregistred user! 2000-03-09 #1 怎么将DBGrid的Parent设置为Form? 设置为 GetParentForm(self) or ValidParentForm(self) 之后就是不显示出来。
学 学生 Unregistered / Unconfirmed GUEST, unregistred user! 2000-03-09 #6 Very easy! DBGrid1.parent:=Form1;
A Another_eYes Unregistered / Unconfirmed GUEST, unregistred user! 2000-03-09 #7 var pt: TPoint; fm: TCustomForm; fm := GetParentForm(DBEdit1); pt := fm.ScreenToClient(DBEdit1.ClientToScreen(Point(0,DBEdit1.ClientHeight))); DBGrid1.Parent := GetParentForm(DBEdit1); DBGrid1.SetBounds(pt.x, pt.y, DBGrid1.Width, DBGrid1.Height); DBGrid1.Visible := True;
var pt: TPoint; fm: TCustomForm; fm := GetParentForm(DBEdit1); pt := fm.ScreenToClient(DBEdit1.ClientToScreen(Point(0,DBEdit1.ClientHeight))); DBGrid1.Parent := GetParentForm(DBEdit1); DBGrid1.SetBounds(pt.x, pt.y, DBGrid1.Width, DBGrid1.Height); DBGrid1.Visible := True;
K kusanagi Unregistered / Unconfirmed GUEST, unregistred user! 2000-03-10 #8 Thanks eYes 偶想了好久都不知道怎么得到Edit在form中的位置,让我试试。看来分是给你定了。