zaphodz34
09-28-2001, 08:44 AM
I gotta bunch of labels in a control array called lblLetters.
I'd like the borderstyle to change from 0 to 1 as I pass the mouse over each letter....
I got it working for one letter or all at the same time....but can't get it working for each indivually....
there are 26 letters btw....
appreciate any help....
cheers
in your mouseover event put
<pre>lblletter(index).borderstyle=1</pre>
zaphodz34
09-28-2001, 09:23 AM
thx for the tip....but I don't seem to have a mouseover event in lblLetters thing( used mousemove).
Anyways, thing is when I move the mouse over the letters...borderstyle changes to 1, but I want it to revert to 0 when I move the move pointer to the next letter....
thx again.......
Banjo
09-28-2001, 09:28 AM
Try this:
<pre>Private Sub lblLetters_MouseMove(index as integer)
Static lastHighlight as Integer
lblLetters(lastHighlight).BorderStyle = 0
lblLetters(lastHighlight).BorderStyle = 1
lastHightlight = index
End Sub</pre>
sorry I meant mousemove, have been mainly web designing lately and have HTML on the brain.
you could either do a loop and set all the other lbls to borderstyle 0, or you could store the index in a variable
<pre>lblletter(oldIndex).borderstyle=0
lblletter(index).borderstyle=1
oldIndex=index</pre>
zaphodz34
09-28-2001, 10:25 AM
I tried that, but it still does the same thing...leaves bordersyyle at 1...
except for the first letter in the array, which reverts back to 0....
the rest(selected ) remain at 1.....
anyways...I appreciate your help....
I'll try to figure it out in the morning.....
it's 20 past midnite now.....
cheers....
Squirm
09-28-2001, 10:43 AM
I had a similar problem with the lightness of label controls. I solved it by creating a 5 twip 'buffer zone' around the inside edge of the control. If the X, Y mouse co-ords were inside this zone, set the borderstyle to 0 (off). Otherwise, change it to 1 (on). It is highly unlikely that the mouse will leave the control WITHOUT passing through the buffer zone. If you need help, I can paste a bit 'o code.........
"except for the first letter in the array, which reverts back to 0.... "
to me that sounds like you are declaring oldIndex inside the sub so each time you re-enter the sub oldIndex is set to 0, try declaring it at the top of the page, under Option explicit