Delphi and Kylix

Moderators: pritaeas
Number of threads: 7244
Number of posts: 19051

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Floating Hint Posted by iceman316 on 3 Sept 2003 at 2:10 AM
Hi, ive got an image box in which ive drawn various shapes free hand using elipse and square, is there any way in which i can give each of them a floating hint or isnt this possible since they cant be referenced? Thanks...

Report
Re: Floating Hint Posted by zibadian on 3 Sept 2003 at 3:57 AM
: Hi, ive got an image box in which ive drawn various shapes free hand using elipse and square, is there any way in which i can give each of them a floating hint or isnt this possible since they cant be referenced? Thanks...
:
:
You need to set the image box's Hint property in the OnMouseMove() event, as the mouse moves over one of the shapes. This should give you hints based on the shape the mouse is over.
Report
Re: Floating Hint Posted by iceman316 on 3 Sept 2003 at 4:05 AM
Thanks, ive attempted to do that but i get the same hint wherever i go on the image.. Heres the code im using:

procedure TfrmTarget.Image2MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
image2.ShowHint := true;
image2.Hint := 'Square';
end;

: : Hi, ive got an image box in which ive drawn various shapes free hand using elipse and square, is there any way in which i can give each of them a floating hint or isnt this possible since they cant be referenced? Thanks...
: :
: :
: You need to set the image box's Hint property in the OnMouseMove() event, as the mouse moves over one of the shapes. This should give you hints based on the shape the mouse is over.
:

Report
Re: Floating Hint Posted by zibadian on 3 Sept 2003 at 4:07 AM
This message was edited by zibadian at 2003-9-3 4:9:17

This code will always give you a 'square' as hint. Here is a sample which should give you two different hints:
procedure TfrmTarget.Image2MouseMove(Sender: TObject; Shift: TShiftState;
  X, Y: Integer);
begin
  if X > Image2.Width div 2 then
    image2.Hint := 'Square'
  else
    image2.Hint := 'Circle'
end;


: Thanks, ive attempted to do that but i get the same hint wherever i go on the image.. Heres the code im using:
:
: procedure TfrmTarget.Image2MouseMove(Sender: TObject; Shift: TShiftState;
: X, Y: Integer);
: begin
: image2.ShowHint := true;
: image2.Hint := 'Square';
: end;
:
: : : Hi, ive got an image box in which ive drawn various shapes free hand using elipse and square, is there any way in which i can give each of them a floating hint or isnt this possible since they cant be referenced? Thanks...
: : :
: : :
: : You need to set the image box's Hint property in the OnMouseMove() event, as the mouse moves over one of the shapes. This should give you hints based on the shape the mouse is over.
: :
:
:



Report
Re: Floating Hint Posted by iceman316 on 3 Sept 2003 at 4:15 AM
Thanks, that helps a lot.

: This message was edited by zibadian at 2003-9-3 4:9:17

: This code will always give you a 'square' as hint. Here is a sample which should give you two different hints:
:
: procedure TfrmTarget.Image2MouseMove(Sender: TObject; Shift: TShiftState;
:   X, Y: Integer);
: begin
:   if X > Image2.Width div 2 then
:     image2.Hint := 'Square'
:   else
:     image2.Hint := 'Circle'
: end;
: 
: 

: : Thanks, ive attempted to do that but i get the same hint wherever i go on the image.. Heres the code im using:
: :
: : procedure TfrmTarget.Image2MouseMove(Sender: TObject; Shift: TShiftState;
: : X, Y: Integer);
: : begin
: : image2.ShowHint := true;
: : image2.Hint := 'Square';
: : end;
: :
: : : : Hi, ive got an image box in which ive drawn various shapes free hand using elipse and square, is there any way in which i can give each of them a floating hint or isnt this possible since they cant be referenced? Thanks...
: : : :
: : : :
: : : You need to set the image box's Hint property in the OnMouseMove() event, as the mouse moves over one of the shapes. This should give you hints based on the shape the mouse is over.
: : :
: :
: :
:
:
:
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.