开发者

Delphi component's programming

Does anybody know if it is possible to visually see and edit components at developing time? i would like to create a component based on TPanel, but i dont have any design window (or dfm) where i can visually add components on it, i found related threads in which some programmers claim it开发者_开发技巧s not possible.

Any ideas if its possible and how?

thnx


Nope. Using frames is the best you can do to develop compound components with the aid of the visual designers.

See this article http://etutorials.org/Programming/mastering+delphi+7/Part+II+Delphi+Object-Oriented+Architectures/Chapter+9+Writing+Delphi+Components/Creating+Compound+Components/

And specifically the section "Building Compound Components with Frames".


Make a project group. Add a package to that project group. Add/install a component in that package. Add a VCL forms application to the project group. Right click on a project group and choose build all. This way you will be able to 'visually' track the progress of your component during the development.


An alternative to compound components is to use component templates.

They're not proper components, rather they're just a shortcut to you copying and pasting the components and their event handlers from one form to another. You can manipulate them using the designer though so they may be suitable for your purposes.


what you are asking is, I believe, is how to create components and interact with them at design time no ?(by example the behavior of datasets, properties of a form,etc).

here you have an example http://www.podgoretsky.com/ftp/docs/Delphi/D5/dg/register.html

best regards,
Radu


I take this question to mean that you wish to develop a custom component and to do so visually rather than in code. If that is your question then I'm afraid that you can't do it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜