Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Mouse over a Box label? (Read 3750 times)
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Mouse over a Box label?
Dec 20th, 2011 at 2:58am
Print Post  
Hi

Is there a way to detect if the mouse is over a box label (Box.Text) with TextStyle=tsBelow. ObjectFromPoint doesn't work in this case

Thank You, and Happy Christmas for everybody Cheesy
Carlos
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Mouse over a Box label?
Reply #1 - Dec 20th, 2011 at 7:52am
Print Post  
Hi,

Merry Christmas to you too Smiley

You could do something like this:

Code
Select All
dim w as Integer
dim h as Integer
dim b as Box

for each b in fcx.Boxes
	fcx.MeasureString(b.Text, b.Font, w, h)
	if mouseY >= b.Top and mouseX >= b.Left and _
		mouseY <= b.Bottom + h and mouseX <= b.Right then
		' mouse is over b or its label
		' ...
	end if
next b 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Re: Mouse over a Box label?
Reply #2 - Dec 20th, 2011 at 5:35pm
Print Post  
Seems heavy to put inside MouseMove, but I'll try it.
thanks
  
Back to top
 
IP Logged
 
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Re: Mouse over a Box label?
Reply #3 - Dec 21st, 2011 at 12:51am
Print Post  
Doesn't work with multiline labels Sad
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint