In Windows, a canvas UseFocusRing property has no effect because Xojo does not draw a focus ring anyway.
As stated very clearly in the LR at
http://documentation.xojo.com/index.php/Canvas.UseFocusRing
[quote]If True, the Canvas indicates that it has the focus with a ring around its border; if False, the appearance of the object does not change when it has the focus.
Setting this property to True has no effect on Windows or Linux. The default is True.[/quote]
In another thread I was said that I did not know what I was talking about when I tried all so politely to state that fact. Well, I can accept being ignorant, although the formulation could have used some manners.
No matter, ignorance is easy to cure through research. And nobody should ever be shamed for that here, as we should be sharing knowledge in good intelligence, instead of making others feel bad. The mere fact that Xojo indeed never shows a Focus ring in Windows and Linux applications cannot be disputed.
But would a focus ring be possible in Windows around a canvas outside of Xojo, if for some reason that was left aside, somehow ? I tried to scour msdn for “Focus ring” and “FocusRing” but the results where all about Mac OS X
Never mind ; at courageous heart nothing impossible. So I embarked on Visual Studio VB in the hope of finding the all elusive Focus Ring a luminary once told me he knew what it was about.
In VB a PictureBox which, to my naive eyes, looks very much like a Canvas, does not seem to have a Focus property. Hence it seems very difficult to obtain the prized blue ring around it. But a button can have the focus, and does exhibit a focus ring when selected. And more interestingly, in VB, a button can contain a picture. So in no time I was able to obtain a control showing a focus ring and a picture inside. Conclusion, VS VB .NET knows not focus rings around picture boxes, but one can get roughly the same effect by using a button.
Back to Xojo, we do have buttons that can show a picture : BevelButtons. So I proceeded to adapt the project that let me discover the drag box in OS X Carbon, and dragged a file over the BevelButton. Here is the result :
Bevelbuttons have a grey focus ring, but they do have one (it is blue around a normal button). And when the cursor hovers them, they turn blue automatically, with or without a file in drag. So indeed the functionality of showing a selection when dragging a file over an area in Windows is possible, if not over a Canvas (unless by drawing a rectangle inside them).
Changing from Canvas to BevelButton may not be terribly convenient for Cross Platform applications. Another way is to draw the focus ring inside the canvas. I posted the pure Xojo code I use at Drag border vs FocusRing, visual cues and drop file selected - macOS - Xojo Programming Forum
I know, some superior minds will frown about yet another workaround. As a modest human being, I am just under the impression that coding is not about wishing for what should exist, but rather to build apps that exhibit a given behavior, would that be through less travelled paths. In other words, instead of making things impossible through dogmatism, being pragmatic enough to accept things as they are.
I am posting this in the event of a search for ‘Windows Canvas focus ring’ or something to that effect. Hope it will be of use.
I may not know what superior minds are talking about, but I am content to, sometimes, help once in a while a fellow human being get the result he wants. Courtesy and good manners included.