TextArea Focus Ring Property is ON in the IDE but…

TextArea Focus Ring Property is ON in the IDE, but at design time.

Unless this is local to my OS X machine, the Focus Ring does not appears at run time (in the IDE).

Did you get the same ?

TextFields and ListBox have the Focus Ring.

[quote=212842:@Emile Schwarz]TextArea Focus Ring Property is ON in the IDE, but at design time.

Unless this is local to my OS X machine, the Focus Ring does not appears at run time (in the IDE).

Did you get the same ?

TextFields and ListBox have the Focus Ring.[/quote]

I don’t think I ever saw a TextArea with a focus ring. That maybe there for when a TextArea is used as TextField.

You can simulate it for the plain TextArea, if you really think you need it :

Place a canvas over the TextArea, 4 pixels wider, 4 pixels higher, Top at 2 pixels above, Left at 2 pixels on the left.

To obtain the focus ring, do this in Paint :

Sub Paint(g As Graphics, areas() As REALbasic.Rect) g.ForeColor = &c66CCFF00 g.PenWidth = 2 g.DrawRect(0,0,me.width,me.height) End Sub

NOTE: OS X does not support focus rings for TextArea controls in Cocoa applications, so setting UseFocusRing to True has no effect in Cocoa builds. This is not a bug in the TextArea control.

That’s right and it’s because Xojo mostly uses native controls so you get the correct behavior for each platform.

As @Michel Bujardet said, you could easily create a nice containercontrol having a textarea on a canvas and to be complete a label at the left.
When it comes to Windows, @Greg O’Lone stated a while ago to avoid heaping controls since that could cause a lot of flickering while resize a windows.
So I think you can make a very nice GUI, but you might run into unexpected behavior and that will take you quite a lot of time.

[quote=213021:@Joost Rongen]As @Michel Bujardet said, you could easily create a nice containercontrol having a textarea on a canvas and to be complete a label at the left.
When it comes to Windows, @Greg O’Lone stated a while ago to avoid heaping controls since that could cause a lot of flickering while resize a windows.
So I think you can make a very nice GUI, but you might run into unexpected behavior and that will take you quite a lot of time.[/quote]

In Windows, indeed, I would not use a canvas over the TextField, but rectangles 2 pixels wide or high all around the TextArea, which are turned visible or not.

Apple HIG, but also Windows Design Guidelines do not refer to any Focus Ring around TextArea, though. I would make darn sure this is absolutely indispensable before implementing such an unusual feature. Normally, one can see a TextArea has focus when the blinking caret shows. It should be enough for most users ; the focus ring may be necessary for impaired users or something, but IMHO it should not be used for a regular app.