In a TextArea:
UseFocusRing: ON
(Try to add in the TextArea *) Three events and place the code below:
a. DragEnter
b. DragOver
// Displays the Focus Ring
Me.UseFocusRing = True
Me.Invalidate
c. DragExit
// Remove the Focus Ring
Me.UseFocusRing = False
Me.Invalidate
Run,
Select some styled text from Apples TextEdit,
drag the selected text above the TextAre,
Nothing (No Focus Ring).
I added (while writing this text) two new Events: GotFocus and LostFocus and filled them with the appropriate code (read above). No FocusRing while dropping a Text from Apples TextEdit or from the project running in the IDE (I selected some text in Apples TextEdit, then go to the project Main window and drag n Drop it onto the TextArea. The TextArea is not selected (does not have the focus prior to the drag n drop).
The iBeam cursor moves vertically accordingly to the Mouse in the drag move.
Ideas ?
BTW:
Xojo 2014r2
OS X 10.9.4
- I do not know how I achieved that, but I put two new Events in the Window instead of in the TextArea Control. I wasted some minutes to try to duplicate the bad experience, I still do not know how to replicate that.
Yes, it is not the first time this happens to me.
OK, I wanted to add another event, but I took my time. The first attempt, I had DropObject selected (first stade of selection): it allows me to add GotFocus. The second attempt (GotFocus was selected, first stage), and the drawer shows me that I will add an event to the window. Any successive attempts will try to add the event into the window, not the Control (TextArea).
I was able to place the LostFocus event to the TextArea when I selected the TextArea Control (still first step).
I selected the newly added LostFocus event (in the TextArea expanded view), then clicked a second time and chooses to add a new event and got the drawer telling me that I will add an event to the window.
I have done many go to Apples TextEdit, back to Xojos IDE while doing these steps. I also had Preview Open.
Nota: it seems to me, here, that it is very easy to replicate this IDE feature.
Did I told you, lately, that I feel insecure while using Xojos IDE ?
Yes Man !
Last check: I put user interface feedback text in GotFocus / LostFocus. All I Get is either that text OR the dropped text. Never both. To get the dropped text, I have to click in the windows background where I have code to clears the Focus !
I will take a breakfast now because nausea comes to me.
Breakfast is going fine. I checked that project as a Standalone under Windows XP: it worked like it does on OS X (more or less).
BUT: the selected text in Wordpad disappears once the drop occurred. Strange Windows behavior (bad people will say: usual Windows behavior !): use Copy / Paste if you do not want to loos text in your documents !