need help with code, I am trying to have two clickable response buttons on a slide
David Wang
jiaxiking at gmail.com
Mon Jul 16 03:32:57 UTC 2012
Now I have a new question. The two buttons I used are text boxes (light
gray background, Bold black font).
To make the buttons more realistic, I am trying to have the background
color change when my mouse hovers over them.
No clicking will happen, I simply want the program to monitor the location
of the cursor; and when the cursor is over the buttons, the backcolor of
the buttons can change.
I am sorry to bother you again, but I do need help :(
My thought is to
dim leftbutton as rect
(is this correct? leftbutton is the string name of a button on the slide.)
Dim curPoint As Point 'mouse over
Dim ETTime As Long
ETTime = Clock.Read
Dim ETTimeInterval As Long
ETTimeInterval = 10
'---loop the positioning mechanism before a response is made
Do While Slide5.InputMasks.Responses.Count = 0
'=== request eye or mouse data every ETTimeInterval ms
If (Clock.Read > ETTime) Then
'Set the next log time
ETTime = Clock.Read + ETTimeInterval
'---- highlight AOI ( mouse over )
Mouse.GetCursorPos curPoint.x, curPoint.y
If PointInRect(curPoint,leftbutton ) Then 'This I don't
understand. Am i in the right path to make a textbox a rect in the inline,
then use it in a pointinrect and color change command?
leftbutton.BackColor = color.silver
leftbutton.Draw
Else
leftbutton.BackColor = color.gray
leftbutton.Draw
End If
end if
loop
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/oCQYtMwJ3eAJ.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20120715/071468f4/attachment.htm>
More information about the Eprime
mailing list