窗体里面有多个各种各样的组件,而且都是隐藏的。怎么把其中Name为MyEdit组件显示出来?
解决方案 »
- 老婆生了个儿子,没接到分的兄弟这里补上
- listbox问题
- 错误提示: 'Unit StdActns was compiled with a different version of StrUtils.TStringSearchOptions'
- 高手们怎么样判断一个数据是否是浮点型数据
- Delphi的安装序列号是多少???
- 如何使一个对话框显示时正好盖住主窗口?
- 关于局域网内防火墙的问题,希望知道的朋友解答。
- 要命呀,公司要我在一个星期之内掌握delphi+Oralce,两个月做出一个生产管理系统,有没有可能?
- 很急的问题:Delphi中调用NetscapeNavigator!
- procedure fun(var v:integer)和procedure fun(v:integer)究竟有什么不同
- 请问,使用quickrep组件生成报表,纸张大小怎么设置?
- 如何取得sql server的数据库实例名?
edit:Tcomponent;edit:=form1.findcomponent('MyEdit');
if edit<>nil then
edit.visible := true;
begin
if (self.Components[i].name is MyEdit) then
begin
self.components[i].visible:=true;
end;
end;
end;
begin
if (Components[i] is tedit) then
begin
if (Components[i] as tedit).name='Edit1' then
begin
(Components[i] as tedit).Visible:=true;
exit;
end;
end;
end;
TForm1 *Form1;
TEdit* pe[20];void __fastcall TForm1::FormCreate(TObject *Sender){
const char* pszNamePrefix = "MyEdit";
for (int i=0;i<EditBoxCount;i++)
{
pe[i] = new TEdit(this);
pe[i]->Name = pszNamePrefix + IntToStr(i+1);
pe[i]->Left = LeftCoordinate;
pe[i]->Top = i*EditBoxCount;
pe[i]->Parent = this;
} delete pszNamePrefix;
}void __fastcall TForm1::FormDestroy(TObject *Sender){
for (int i=0;i<EditBoxCount;i++)
delete pe[i];
}