Products



Stay in touch

Add your e-mail address here to receive the monthly TMS Software alerts.


    


Adding the Office 2007 hints to your custom controls with TAdvOfficeHint

Office 2007 hints

All controls that are part of the TMS Advanced toolbars & menus feature an extended Office 2007 style hint. Office 2007 hints are more sophisticated than regular Delphi hints. An office 2007 hint has a title, an optional picture, help text and an optional help line.

This title, help text, picture and optional help line is set through the property OfficeHint which has subproperties:

OfficeHint.Notes: stringlist containing help text
OfficeHint.Picture: BMP, ICO, GIF, JPG or PNG image for the hint. Preferred image type if PNG as the alpha channel is used for transparency
OfficeHint.ShowHelp: When true, an extra line is shown in the hint to suggest to press F1 for help
OfficeHint.Title: sets the title of the hint

To make use of the new hint style, drop the component TAdvOfficeHint on the form and use the OfficeHint property of the components to set hint subject, picture, notes and help line. The regular Hint property is no longer used when a control has an OfficeHint property. Set ShowHint to true when the hint is enabled for a control.

Controls that are not part of the TMS Advanced Toolbars & Menus can be extended with Office 2007 hints as well. Any component that has a property OfficeHint will be recognized by TAdvOfficeHint on the form and TAdvOfficeHint will render the hint as new Office 2007 style with settings as defined in the OfficeHint property.

This code snippet shows the code that was added to extend a custom control with the Office 2007 hint type. Note that the unit AdvHintInfo is added to the uses hint as the TAdvHintInfo class is defined in this unit.

interface

uses
  Classes, AdvHintInfo;

type

TMyCustomControl = class(TCustomControl)
private
  FOfficeHint: TAdvHintInfo;
  procedure SetOfficeHint(const Value: TAdvHintInfo);
public
  constructor Create(AOwner: TComponent); override;
  destructor Destroy; override;
published
  property OfficeHint: TAdvHintInfo read FOfficeHint write SetOfficeHint;
end;

implementation
{ TMyCustomControl }

constructor TMyCustomControl.Create(AOwner: TComponent);
begin
  inherited;
  FOfficeHint := TAdvHintInfo.Create;
end;

destructor TMyCustomControl.Destroy;
begin
  FOfficeHint.Free;
  inherited;
end;

procedure TMyCustomControl.SetOfficeHint(const Value: TAdvHintInfo);
begin
  FOfficeHint.Assign(Value);
end;

From this code, it is clear that adding Office 2007 hints to other controls in your application is straightforward and easy.  Let the Office 2007 fun begin ...


Copyright © 1995 - 2015 TMS Software v4.0


Being a fan of the Sakura replica watches Wars (Sakura Taisen) franchise, when I pop replica handbags this disc replica louis vuitton into my player, never in my life replica handbags was I so excited (well along with the rolex replica last volume of Princess Nine since louis vuitton replica it came with my order) to see this second OAV series. Can you tell what I think about this show?On chanel replica the first episode on the disc, it's chanel replica basically a story about Maria's past coming back to haunt her. A shady character, by the rolex replica name of Valentinov, comes to Japan looking to exact revenge rolex replica on Maria. He sets up bombs in the Imperial Theatre, which forces Maria breitling replica to come face with the past she wanted to leave behind.