H hebohb Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #1 我想判断一个component是否有left属性,请问高手们应该怎么写
M michael.ma Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #2 try xx.left=1; except showmessage('no left'); end;
D Dinky Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #3 uses typinfo; var pPropInfo; begin p:=GetPropInfo(Memo1.ClassInfo,'Left'); if p=nil then showmessage('No Left') else ShowMessage('Left'); p:=GetPropInfo(Button1.ClassInfo,'Left'); if p=nil then showmessage('No Left') else ShowMessage('Left'); end;
uses typinfo; var pPropInfo; begin p:=GetPropInfo(Memo1.ClassInfo,'Left'); if p=nil then showmessage('No Left') else ShowMessage('Left'); p:=GetPropInfo(Button1.ClassInfo,'Left'); if p=nil then showmessage('No Left') else ShowMessage('Left'); end;
H hebohb Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #4 to michael.ma 我要的不是跳过错误的方法啊