Solved

Making hints show longer

Posted on 1998-04-29
4
201 Views
Last Modified: 2010-04-06
Hi,
I need to display the hints in my program for longer than
they do now. I need them to show for 6 seconds.
What do i need to do?
MAXcom
maxcom@theoffice.net
0
Comment
Question by:MAXcom
  • 3
4 Comments
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 100 total points
ID: 1339493
Hi

You must use the Application.HintHidePause property, which defaults to 2500 ms.

E.g. for 6 seconds:
Application.HintHidePause := 6000;

Cheers,
JB
0
 

Author Comment

by:MAXcom
ID: 1339494
Thanks, is there any way i can update the hint while its being shown? And display the new changes without having the user move the mouse off and then back onto the object.
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1339495
Hi

I don't think there is a way to change a hint while it's being shown.  You need to call TApplication.CancelHint (no problem there) and then TApplication.ActivateHint.  Unfortunately Borland (in their infinite wisdom!) have made ActivateHint a private method, so it can only be called by TApplication, and not from the outside.

JB
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1339496
Hi MAXCom

I have been playing around, and have a way to change the hint with minimal flicker.  (Unfortunately it does flicker a little as the hint changes.)

// - - - START OF CODE - - -
var
  OldPause: Integer;
begin
  OldPause := Application.HintPause;
  Application.HintPause := 0;
  Application.CancelHint;
  MyControl.Hint := 'This is a new hint';
  Application.ProcessMessages;
  Application.HintPause := OldPause;
end;
// - - - END OF CODE - - -

Cheers,
JB
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now