Location:
Search - Tcolordialog
Search list
Description: 新建一个C++Builder项目 设置Form1的font为“宋体,小五” 在Form1中添加一个TRadioGroup组件rgDrawWhat供选择画什么图形;添加一个Tbutton组件colorBtn和一个TcolorDialog组件ColorDialog1;添加一个TImage组件Image1。 3、 将当前项目保存在自己实验文件夹的exp1子文件夹中(以防错误操作而前功尽弃)。 编写colorBtn的OnClick事件,激活ColorDialog1,并获取所选择的颜色: if (ColorDialog1->Execute()) Image1->Canvas->Pen->Color = ColorDialog1->Color 5、 编写Image1的OnImage1MouseUp事件,要求实现: 1) 若是第奇数次鼠标按钮弹起,则根据rgDrawWhat的选择,记录直线第一个端点或圆心坐标; 2) 若是第偶数次鼠标按钮弹起,则根据rgDrawWhat的选择,记录直线第二个端点并利用TCanvas的MoveTo()和LineTo()方法画出直线段,或计算出圆的外接矩形后调用TCanvas的Ellipse()方法画圆。-C Builder a new project set the font to Form1 "wherein V" in Form1 add a TRadioGroup components rgDrawWhat options for what painting graphics; Add a Tbutton colorBtn components and a TcolorDialog ColorDialog1 components; Add a TImage component Image1. 3, the current project will be kept in their laboratories folders exp1 Documents folder (to prevent erroneous operation and wasted). Preparation colorBtn the OnClick, ColorDialog1 activated, and access to the choice of colors : if (ColorDialog1 - gt; Execute ()) Image1 - gt; Canvas - gt; Pen-gt; Color = ColorDialog1 - gt; Color 5, the preparation of OnImage1MouseUp Image1, call for : a) If the first odd number of pop-up mouse button, then choose rgDrawWhat the record straight section or an endpoint Center coordinates; 2) If the firs
Platform: |
Size: 584157 |
Author: 朱磊 |
Hits:
Description: 新建一个C++Builder项目 设置Form1的font为“宋体,小五” 在Form1中添加一个TRadioGroup组件rgDrawWhat供选择画什么图形;添加一个Tbutton组件colorBtn和一个TcolorDialog组件ColorDialog1;添加一个TImage组件Image1。 3、 将当前项目保存在自己实验文件夹的exp1子文件夹中(以防错误操作而前功尽弃)。 编写colorBtn的OnClick事件,激活ColorDialog1,并获取所选择的颜色: if (ColorDialog1->Execute()) Image1->Canvas->Pen->Color = ColorDialog1->Color 5、 编写Image1的OnImage1MouseUp事件,要求实现: 1) 若是第奇数次鼠标按钮弹起,则根据rgDrawWhat的选择,记录直线第一个端点或圆心坐标; 2) 若是第偶数次鼠标按钮弹起,则根据rgDrawWhat的选择,记录直线第二个端点并利用TCanvas的MoveTo()和LineTo()方法画出直线段,或计算出圆的外接矩形后调用TCanvas的Ellipse()方法画圆。-C Builder a new project set the font to Form1 "wherein V" in Form1 add a TRadioGroup components rgDrawWhat options for what painting graphics; Add a Tbutton colorBtn components and a TcolorDialog ColorDialog1 components; Add a TImage component Image1. 3, the current project will be kept in their laboratories folders exp1 Documents folder (to prevent erroneous operation and wasted). Preparation colorBtn the OnClick, ColorDialog1 activated, and access to the choice of colors : if (ColorDialog1- gt; Execute ()) Image1- gt; Canvas- gt; Pen-gt; Color = ColorDialog1- gt; Color 5, the preparation of OnImage1MouseUp Image1, call for : a) If the first odd number of pop-up mouse button, then choose rgDrawWhat the record straight section or an endpoint Center coordinates; 2) If the firs
Platform: |
Size: 583680 |
Author: 朱磊 |
Hits:
Description: TITLE:
GRAPHIC EXAMPLE
DESCRIPTION:
A basic line drawing application. This user save line drawings to bitmap
files.
DEMONSTRATES:
TSpeedButton, TUpDown, TOpenDialog, TColorDialog, TScrollBox, TImage
COMMENTS:
-TITLE:
GRAPHIC EXAMPLE
DESCRIPTION:
A basic line drawing application. This user save line drawings to bitmap
files.
DEMONSTRATES:
TSpeedButton, TUpDown, TOpenDialog, TColorDialog, TScrollBox, TImage
COMMENTS:
Platform: |
Size: 2415616 |
Author: croms |
Hits:
Description: 如何使用TcolorDialog这个类,是自己总结的一个小程序-How to use TcolorDialog this class, is his summary of a small program
Platform: |
Size: 353280 |
Author: hongtian |
Hits: