Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
412 views
in Technique[技术] by (71.8m points)

dwm - Google Chrome style tabs on glass in Delphi

I am trying to implement Google Chrome style tabs, in Windows 7, in a Delphi application.

The elements of this are:

  • tabs may extend into the non-client area as they do in google chrome itself.
  • draws properly on Vista and Windows 7 when glass is enabled
  • tabs work just like google chrome, and look like google chrome, over glass.

enter image description here

I have found that the challenges I have to overcome are:

  • How do I get a control (VCL control) to extend into the non-client area? (A good sample of a control that does this is the Ribbon control included in the VCL sources, but I haven't seen anybody else do it, and it takes some wicked hacking to get the Ribbon to function)
  • How to draw bitmaps properly over glass? (DWM API). A related question already answers that aspect, here, this question was also asked by me.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I've just completed a pretty much complete implementation of Chrome Tabs for Delphi.

enter image description here

The features include:

  • Fully configurable Look and Feel including gradients, transparencies and custom tab shapes
  • Tabs can be painted in the title bar when using Aero
  • Works on Vista glass
  • Tab movement animation
  • Tab transitional style effects (fade between colours and alpha levels)
  • Drag and Drop within container and between containers
  • Drag image displays tab and any TWinControl
  • Smart tab resizing when user clicks close button
  • Fluid tab resizing with minimum and maximum tab sizes
  • Add tab button can be positioned on the left, right or floating right
  • Full featured scrolling including auto scroll when dragging
  • Smart tab content display hides/shows items depending on the tab width
  • Owner draw any item
  • Right to Left text
  • Pinned tabs
  • Tab spinners - both rendered and bitmap.
  • Modified tabs with animated glow
  • Tab images and overlay images
  • Mouse over glow
  • Lots of events
  • Load/save look and feel and options to stream/file
  • Generate look and feel/options Delphi code

You can download the source and a full demo/editor here: http://code.google.com/p/delphi-chrome-tabs/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...