Thursday, March 01, 2007

Delphi 2007 - Tool Palette Changes

This is something I really hated in BDS 2005/2006. I'm glad that CodeGear people fixed the behaviour (although I'm sure there will be people claiming that previous implementation was proper and that it's broken now).

I don't know about you, but I'm using Tool Palette filtering a lot. For example, if I have to drop a TListBox on the form, I just press Ctrl-Alt-P to select Tool Palette and type list. Tool Palette will show filtered subset of components - only those starting in list or Tlist (case insensitive, of course). Then I just press Enter to drop the selected component on the form. When I need new TButton, I do the same, except that I have to type bu. But when I need TSpeedButton, I have to type spee, because Tool Palette only matches characters at the beginning of the component's name (give or take that extra T). And when I need some very specialized button, maybe something from the JVCL or Tnt, I browse through the complete component list as I don't always know what prefix the given component uses.

This behaviour will be enhanced in Delphi 2007. Here, Tool Palette filter searches complete component name - when you type bu, for example, it will display all components containing this substring at any position, including TSpeedButton, TCategoryButtons and whole lot of other buttons. Exactly what I need!

The only thing that's bothering me at the moment (but which may change in the final release) is that Standard components are not on the top of the list. I'll much more frequently need TButton than TSpeedButton.

Tool Palette in BSD 2006 and Delphi 2007 beta

Filtered Tool Palette in BDS 2006 (left) and Delphi 2007 Beta (right)

[I'm blogging about Spacely - the beta version of Delphi 2007 for Win32 - with special permission given from CodeGear.]

Technorati tags: , ,

3 comments:

  1. Anonymous15:35

    Thanks Primoz for sharing this

    I hate the old behavior too, so the new change will be very helpful for me and others

    ReplyDelete
  2. Anonymous15:47

    One issue I have with the palette in Turbo Delphi is that I frequently start typing the name of the component I want to find, only to discover that I have just changed some property in the Object Inspector. The reason for this is that the caption area of the dockable toolwindows allways look the same, focused or not, when they are set to "autohide".

    ReplyDelete
  3. Anonymous15:58

    I like the full substring matching. Agree about the order of the results, though...
    I guess there should be some kind of ranking of the search results. Either by most used or at least by position of the substring, i.e. matches where the search string appears earlier in the component name should be listed before ones where the substring appears closer to the end (thus placing TButton before TSpeedButton in your example) ...did that make sense?
    Possibly you'd also have to drop categories entirely if you went for such an approach...

    ReplyDelete