开发者

Tabbed document interface in Delphi

I'm considering different user interface layouts for my next project and I was wondering if there are either integrated or 3rd party frameworks which allow me to create tabbed document interface?

To clarify, what I want is not some kind of docking mechanism or either an MDI interface but primarily a framework which allows me to have one main form and one or more secondary forms which will 开发者_StackOverflow中文版be shown as tabs inside the main form.

Though I said I don't want any kind of docking mechanism, I made a small test application that actually uses it. The result I got is very close to what I want. First, I miss some features like the close button on each tab. Second, I'd have to create some kind of framework of my own in order to automate all tasks, like creating and destroying the tabs, associating each new form with its tab, freeing the form when the associated tab is closed and so on. I'm not saying I can't do it but I'd like to know if there are any ready-made frameworks which already have all these features. Though I'd prefer an open source solution, a commercial one is also welcome.


Third-party components are not mandatory here.

You can use standard Delphi controls to obtain what you want:

  • Put a TPageControl on your form (from Win32 tab);
  • Set its Align property to alClient;
  • Right click on the control, then select "New page" to add a new page.

Then don't write your "tabbed" interface on forms, but on frames.

You can also create pages by code, displaying the frame inside each page.


I don't think there is any framework for tabbed interface, but for nice looking tab/page controls with close buttons on each tab, please check the following:

  1. rkSmartTabs, it simulates Google Chrome browser's tabbed UI. and it's open source.
  2. TAdvOfficePager, MS Office style.

Hope it helps.


I recommend using a tool bar(TToolBar or any similar) and frames(TFrame) in order to mimic tabbed interface, reason?! well Delphi is going cross platform(no secret in that) they will port most if not all of the standard VCL shipped with Delphi, so WHY NOT use this as an advantage?

Just create the frame(dynamically) when the user clicks on a button from tool bar and destroy the previous one(if exists) so you will keep memory usage at minimum, application startup/shutdown time will be very good, on the other hand, if you chose to use (cx)TPageControl, TAdvPager, etc. you might get caught in a situation in which one form(the main I suspect) will have so many VCL's that it will take a lot of UNNECESSARY memory and it will be slow.

Using frames has a lot of advantages, if somewhere in your application you need a "tab" to be shown, you can simply create the needed frame dynamically and use it without additional work.

Anyways, this is my two cents, hope this helps.


I recommend TvjPageList, which is part of the JVCL suite of components. It's open source and seems to fit your requirements.


I use JVCL JvDocking, and its tabbed docking system, to make MDI-like applications.

You can also float, or tile your windows, in addition to having them in tabs.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜