在Delphi中使用框架的接受方式是什么? [英] What is the accepted way to use frames in Delphi?

查看:175
本文介绍了在Delphi中使用框架的接受方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我主要是一个Delphi爱好者,而不是专业人士,所以我不得不学习如何使用TFrames我自己的方式女巫是:




  • 在它的单位内创建一个TFrame。

  • 添加该单元以主窗体Uses子句为单位。

  • 拥有该TFrame类型的私有变量

  • 该表单的OnCreate将启动TFrame并将其附加到一个TPanel在创建和.Parent

  • 在我的一个操作中设置TFrame.Visible:= True和.BringToFront。



这是我经过一些个人审议后的做法。



还有什么其他方法可以使用框架?

解决方案

这是一种方式,没有任何错误。另一种方式是在视觉上做。所以你可以将框架添加到窗体中。要做到这一点:




  • 创建您的框架。

  • 转到您要放置的表单您的框架。

  • 添加框架组件(标准选项卡)

  • 从下拉菜单中选择您的框架。

  • 就是这样!


I was having my usual stroll around SO and bumped on some frames discussions.

I'm mainly a Delphi hobbyist and not a professional so I had to learn how to use TFrames my own way witch is:

  • Create a TFrame inside it's unit.
  • Add that unit to the main form Uses clause.
  • Have a private variable of that TFrame's type
  • OnCreate of the form instanciates the TFrame and attaches it to a TPanel both on the Create and .Parent
  • On one of my Actions set that TFrame.Visible := True and .BringToFront.

This is my practice after some personal deliberation.

What other ways can one use the frames?

解决方案

That's one way, and there is nothing wrong with it. Another way, is to to do it visually. So you can basically add the frame to a form. to do this you :

  • Create your Frame.
  • Go to the form you wish to put your frame on.
  • Add a Frames component (Standard Tab)
  • Choose your frame from the drop down.
  • That's it!

这篇关于在Delphi中使用框架的接受方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆