PeterdeB
asked on
How to access the properties of this component?
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,
Dweep
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,
Dweep
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.Image1MouseMo ve(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
//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(Poin t(x,y)) ;
Application.ActivateHint(p t) ;
end;
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.Image1MouseMo
Y: Integer);
begin
//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(Poin
Application.ActivateHint(p
end;
ASKER
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,
Dweep
Ps i did not know hints could be implemented the way you described