rmXPTabBook.cc  
  A Custom XP Look NoteBook Control
 


The release of dBASE Plus 2.6 brings the first wave of support for XP Themes. The stock dBASE Notebook control will now hand control of it's colours to the operating system where a manifest file is used.

So why bother to create an XP Look version of the rmTabBook control ?

The stock control still doesn't provide a few things that developers sometimes need. You cannot define the width of a tab, you cannot define an individual page colour, and you cannot place a bitmap on a tab.

The rmXPTabBook control overcomes these issues, providing definable tab widths, definable individual page colours, and for the first time allowing the use of a transparent bitmap on a tab.

It is however a fake Notebook, consisting of paintbox controls, and works by changing the form page on clicking a tab, to reveal the controls on that form page and creating the illusion that those controls are actually on the rmXPTabBook surface.

This control does not rely on being run under XP for it's colours, and can be used to equal effect under Win9x, NT, and Win2000 as shown above. The background for an XP notebook is a subtle gradient bitmap, and although sometimes hard to see, it becomes obvious if a control with a non matching background colour is used. For that reason, this control ships with a few sample controls which will automatically adjust their background colour relating to their vertical position in the rmXPTabBook control.

This last screenshot is from an XP machine running the "silver" theme colour, and demonstrates the ability to define an individual page colour. Examine the code in the supplied test form to see how easy all of this is to implement.