delphi在设计时创建组件吗?



                    
                    
天天天晴9080
17135 次浏览 2024-05-10 提问
42

最新回答 (4条回答)

2024-05-10 回答

就是拖拉就行?
这个也可以。
你是不是想问,在运行时可以创建组件吗设计时创建组件,组件就是一个类,可以在运行时创建

2024-05-10 回答

设计时创建组件,运行时也可以创建组件,很方便。

2024-05-10 回答

var i:integer; begin for i:=1 to 10 do begin with TEdit.Create(Self) do begin Name:='edt'+IntToStr(i); Parent:=self; Width:=75; ,TjVxBk

2024-05-10 回答

创建。
在设计期,当你在窗体上置入新的控件时,如果此控件Create事件中创建与该控件所需的组件,会随该控件一并创建,但某些干预设计期的事件将不被执行,由TComponentState决定,如:
if csDesigning in ComponentState then ...
if csLoading in ComponentState then...
参考:
TComponentState = set of (csLoading, csReading, csWriting, csDestroying,
csDesigning, csAncestor, csUpdating, csFixups, csFreeNotification,
csInline, csDesignInstance);
TComponentStyle = set of (csInheritable, csCheckPropAvail, csSubComponent,
csTransient);

相关问题

页面运行时间: 0.084453105926514 秒