[Webinar] Learn how to a build a cloud-first strategyRegister Now


How to access the properties of this component?

Posted on 2007-10-09
Medium Priority
Last Modified: 2010-04-05
Hi Folks,

I'm using a third party componen a TRZCheckGroup and now I want to know whether it's possible to have its items display a hint. As far as I can see it is not possible but I'd like to be convinced of that assumption before I give up and try something else.  The component is from Raize but digging their documentation did not quench my curiosity.

Perhaps someone out here? Btw > if a standard Checkgroups items can display different hints...that would be okay too. I prefer the Raize checkgroup but want to display some info about the items for instance when the mouse moves over them

If you need mroe info please ask,

Kindest regards,

Question by:PeterdeB
  • 2
LVL 13

Accepted Solution

rfwoolf earned 2000 total points
ID: 20044175
The following is how to get a hint coming up for an image. Try it for your component as long as your component has a 'mousemove' or 'mouseover' event handler

==Step 1 ==
Add the following to your unit (form's) OnCreate event:
Application.HintPause := 250;      // 250 mSec before hint is shown
application.ShowHint := true;

procedure TFrmMainMenu.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
  pt: tpoint;
  image1.Hint := ('This is a hint');
  pt := image1.ClientToScreen(Point(x,y)) ;
  Application.ActivateHint(pt) ;


Author Comment

ID: 20044702
Hi rfwoolf,

The RZCheckgroup does not cooperate at all. I tried your code but I really think I cannot manipulate the hints for its items. So I just decided to use checkboxes instead and now I can do what i want.

I tested your code nonetheless and it does what it is s upposed to do...so you get the points.

Thanks for replying,

Kindest regards,


Ps i did not know hints could be implemented the way you described

LVL 13

Expert Comment

ID: 20044894
Thanks Dweep

Another round-about way... you see on the MouseOver and MouseMouse events the procedures carry a few parameters such as X and Y, which pass the location of the mouse on the control's canvas.
So if x = 0 and y = 0 then it would mean that your mouse is at the top-left of your component.
and if x = 0 and y = component.height then your mouse is bottom left of componenet, etc.

If you can calculate the regions in your component  you can adjust the hint accordingly.

Here's an example:
procedure TFrmMainMenu.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
//If mouse in in bottom corner
if X > round(Image1.width / 2) then
if Y > round(image1.height / 2) then
Image1.hint := 'This is the bottom-right quadrant of the control')
//If mouse is in top left corner
if X < round(Image1.width / 2) then
if Y < round(image1.height / 2) then
Image1.hint := 'This is the top-left quadrant of the control')

 pt := image1.ClientToScreen(Point(x,y)) ;
  Application.ActivateHint(pt) ;

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

864 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