Delphi control that could mimic “Add-ons|Extension list” of Firefox?

后端 未结 5 1190
醉话见心
醉话见心 2020-12-03 06:05

My aim is to update the look of the GUI in my app. Currently my GUI contains a lot of listboxes which are used to edit some objects in an old fashioned way, that is, user do

相关标签:
5条回答
  • 2020-12-03 06:55

    Using a TFrame for each list item and put them all Aligned Top on a TScrollBox might work. Also see TDBCtrlGrid which does something like that in combination with datasets.

    0 讨论(0)
  • 2020-12-03 06:57

    You can do something similar (not exactly) with standard components; TDBCtrlGrid, TSpeedButton,...

    alt text http://img8.imageshack.us/img8/9585/imagen29ox3.png

    0 讨论(0)
  • 2020-12-03 06:59

    I mostly agree with Lars, but I would use a frame for each item instead of a panel. That would separate into its own file, and you would get easy designtime support for it.

    0 讨论(0)
  • 2020-12-03 07:02

    It can be done with existing Delphi controls.

    For instance in the TCustomListBox control you can create your own OnDrawItem event to draw your own list item. You also need to create your own OnMeasureItem to change the item height.

    In some cases it is very limited, so if you want more freedom you will need to do it from scratch.

    0 讨论(0)
  • 2020-12-03 07:06

    If you're using Delphi 2007 or Delphi 2009, you might be able to do something similar using TCategoryButtons (from the 'Additional' component palette page). Drop it on a form and right click to display the popup menu, and then click "Categories Editor...". Add a category with the resulting dialog, set it's caption, and optionally set up Items it contains. Not exactly the same, but it might do what you need.

    You could also use a dialog with a TTreeView (if you have categories of objects) or TListView to emulate the Delphi 2007 Projects->Options dialog. Clicking an item in the TreeView or ListView displays the proper page of a TPageControl to configure the object.

    0 讨论(0)
提交回复
热议问题