>Form1->Canvas->TextOut与Label1->Caption在坐标上的区别</P>. s/ Y0 c$ I$ ~* S% s& U
>前者在LEFT〈100,TOP〈100左右,时反映的不是真的坐标,不知道怎么回事?</P>2 U- }/ j+ B: Q* [
>如String str="";1 U2 L8 V( j5 t) `- B
>两者LEFT〈100,TOP〈100左右,数值不一样。且若没有第四行,第二行写成str=str+"x="+X+" "+"y="+Y;也可。不知道什么原因?</P>[em06][em06]: s6 x% E4 m! [/ e! ]
>Note: TextOut does not erase the background before writing Text. To erase the background first, use the FillRect method.</P><
>上面是TextOut的一个注释!意思是TextOut方法在写之前是不能自动清除背景的!为了清除需要使用FillRect方法!所以可以将代码改成:</P><
>String str="";
>这样就没有问题了!</P>
>Form1->Canvas->FillRect(Rect(0,0,100,100));</P><
>是清除(0,0),(100,100)的屏幕吗?</P>| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |