THPGBGPanel – Documentation Overview This component is a TCustomPanel descendant with a lot of new features such as: ? user definable transparent wallpaper tiled, centered or auto-tiling option ? 3D outlined caption which can be displayed at the top, bottom, left or right side and left/top, centered or right/bottom text alignment and free front and background color ? it is enabled to use either a resource name or number or an picture path for its wallpaper or even just use the image property editor to assign one at design time ? 3D border at the top, left, right or bottom side Requirements You need Borland C++ Builder (Version 1.0 or better). Sorry, but Delphi will not work because the component is written entirely in C++. You can use BGPanel with either Window 95 (98) and NT (4.0, 5.0). Installation Copy the files in the installation path BGPanel.obj BGPanel.dcr BGPanel.h to the place where you store your VCL classes. >From inside C++ Builder select menu component and then install. Select cls_BGPanel as new component and then rebuild the library. Done. Copyright THPGBGPanel is Shareware. If you have registered you have the permission to use the component in all non commercial (Shareware, Cardware or something similary) software or package. You may not give this component to any other person. If you want to use the component in a commercial software package please contact the author for special conditions and package licenses. For non-commercial use only: The price for the component is 25$ (cash only). Delivery is done via email only. Send you registration the product you want to buy and the cash to the following address: Hans-Peter Guenther Glockenblumenweg 17 34128 Kassel Germany You will receive the component as object code and the header as .h file and the documentation in Microsoft Word and text file format. Also you got an example C++Builder project which demonstrates the use of THPGBGPanel either at design time and the dynamic creation of the component. You got also free updates and technical support for one year. Usage Use the component like any other component. Add it at design time to any form or TWinControl descendant that accept child controls. Set the appropriated properties with the object inspector. Note there are some properties which cannot be set at design time (mainly the bitmap resource specific properties). At runtime you can use the standard method to create dynamically generated components: Example // This line can be put into the FormCreate event THPGBGPanel *th=new THPGBGPanel(this); th->Parent=this; // show the component in the form th->Align=alClient; // full size th->ResourceName=“MYBGRND“; // set the wallpaper Component THPGBGPanel owns all properties, methods and events from TCustomPanel plus the following additional ones: Properties: ? Bitmap Graphics::TBitmap *Bitmap – this is the wallpaper (background picture) the panel should use. Note: The wallpaper’s left and top will be adjusted to the left and top of the control, so you can put a THPGBGPanel into an THPGBGPanel and if both use the same Bitmap as wallpaper any patterns will be displayed correctly. Keep this in mind if you set the WallPaper property to wpOnce or wpAuto. ? Picture AnsiString Picture – this is the path to the bitmap the panel should use as background picture. If you specify this any ResourceName, ResourceID or Bitmap definition will be cleared. ? ResourceName AnsiString ResourceName – this is the Name of the bitmap in the resource file you want to use as background bitmap. The resource files have to be added to the project first. Note: This property is runtime only and displays an error when you try to set this at design time ? ResourceID int ResourceID – this is the Resource integer which represents the bitmap in the resource file you want to use as background bitmap. Note: This property is runtime only and displays an error when you try to set this at design time ? CaptionType enum THPGPanel::TCaptionType CaptionType – this specifies what kind of caption will be used. TCaptionType is specified as follows: enum TCaptionType { ctNormal, ctRaised, ctLowered }; ctNormal just a normal display using the Font->Color color. No 3D display ctRaised 3D outlined caption display which uses the FGColor property as foreground color and the BGColor as background color for the caption text ctLowered 3D outlined caption display which uses the FGColor property as background color and the BGColor as foreground color. ? CaptionBorder enum THPGPanel::TCaptionBorder CaptionBorder – this specifies where the border and the caption will be placed TCaptionBorder is defines as follows: enum TCaptionBorder { cbTop, cbLeft, cbRight, cbBottom, cbNone }; cbTop (default) the Caption will be displayed at the top as a title with a border line below the text cbLeft the Caption will be displayed at the left of the panel. The text will be written from the top to the bottom cbRight the Caption will be displayed at the right side of the panel the text will be written from the top to the bottom cbBottom the Caption will be displayed at the bottom of the panel as a bottom title cbNone Neither Caption nor Border will be displayed ? WallPaper enum THPGPanel::TWallPaper WallPaper – this specifies how the background picture (if any) will be displayed. enum TWallPaper { wpWallPaper, wpOnce, wpAuto }; wpWallPaper the picture will be tiled. See also the Note at property Bitmap. wpOnce the picture will be displayed once. If the picture is smaller than the actual height and/or width the picture will be stretched to fit in the client region if the picture is smaller the background color will be displayed at the left and/or right side wpAuto (default) the picture will be displayed tiled if the picture does not fit entirely into the client region of the panel else the picture is displayed once. ? FGColor TColor FGColor (default: clWindowText) This property specifies the foreground color of the Caption (only if CaptionType is set to ctNormal or ctRaised) ? BGColor This property specifies the background color of the Caption (only if CaptionType is set to ctNormal or ctRaised) ? TransparentColor TColor TransparentColor - if you set Wallpaper to wpWallPaper and specify here any color but clNone this color will be used as transparent bitmap. Methods: ? __fastcall THPGBGPanel(TComponent* Owner); standard VCL constructor ? __fastcall ~THPGBGPanel(); standard VCL destructor Author If you have any questions, suggestions or want to contact me send a message to the following address: hpgue@aol.com Visit also my home page at http://members.aol.com/hpgue/hpgintl.htm ___