CREATE YOUR OWN HINTS
// ******************************************************************
// CREATE YOUR OWN HINTS
// Category : Hint/ToolTip
// Author : Domas Savickas
// Author Email : domass@takas.lt
// Author Web : http://ddelphi.hypermart.net/delphi
// Tips Website : Domas Delphi Pages
// Tips Website URL: http://ddelphi.hypermart.net/delphi
// ******************************************************************
{
If you don’t quite like the way how Delphi’s default hints look like,
you can use THintWindow component to create your own customized hint window.
Here’s an example:
}
var
h : THintWindow;
r : TRect;
begin
with r do
begin
//
// set the position and size
// of the hint window
//
left := 10;
top := 50;
right := 200;
bottom := 100;
end;
h := THintWindow.Create( Self );
with h do
begin
//
// set the background color
//
Color := clRed;
ActivateHint( r, ‘hi there!’ );
//
// perform your tasks here
// before closing the hint window
//
MessageBox( 0,
‘Press any key to close the ‘
+ ‘hint window’,
‘THintWindow’,
MB_OK );
ReleaseHandle;
Free;
end;
end;
No comments yet.
Leave a comment
-
Archives
- November 2007 (8)
- October 2007 (32)
-
Categories
-
RSS
Entries RSS
Comments RSS