Shape组件画圆

mazhichao84 2010-08-01 09:00:40
哪位高手帮我看一下,谢谢!
代码:
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Shape1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
Shape1->Shape=stCircle;
Shape1->Color=clRed;
Shape1->Style=bsVertical;
}
错误提示:
[C++ Error] Unit1.cpp(22): E2247 'TControl::Color' is not accessible
[C++ Error] Unit1.cpp(23): E2316 'Style' is not a member of 'TShape'
...全文
109 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ximenziplc 2010-08-01
  • 打赏
  • 举报
回复
void __fastcall TForm1::Shape1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{

Shape1->Shape=stCircle;
Shape1->Brush->Color =clRed;
Shape1->Brush->Style=bsVertical;

}
mazhichao84 2010-08-01
  • 打赏
  • 举报
回复
谢谢!!!

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧