Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > Oracle Database, SQL, Application, Programming


Create your own hints


Reply
Views: 1635  
Thread Tools Rate Thread
  #1  
Old 08-20-2010, 10:57 AM
bholas bholas is offline
Award Winner
 
Join Date: Apr 2010
Posts: 4,977
Default Create your own hints

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;

Reply With Quote
Reply

Tags
programming tips

New topics in Oracle Database, SQL, Application, Programming





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)