Solved

Making hints show longer

Posted on 1998-04-29
4
209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Suggested Courses
Course of the Month6 days, 5 hours left to enroll

626 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