Focus Ring Weirdness

I have a simple window with a toolbar, page panel control, and a container control in each of the two page panels. When the window first opens, it really appears like the page panel control has a focus ring - which should not be possible, right?

  • The toolbar switches the active panel, and switching does not remove the focus ring
  • the container controls both have AllowFocusRing = False
  • while testing I had made the page panel smaller than the window and was able to loose the focus ring by clicking on the window background
  • In Window.Opening i have Self.SetFocus and that does nothing.

Has anyone seen this before?

May this helps

That does help, thanks! The search control was mentioned in that thread and I think that’s the common denominator here - I have a search control also.

I replaced the Xojo DesktopSearchField control with my own search field and the focus ring problem went away.

1 Like

Could you share your searchfield? I have this, too, in some windows where I was able to finagle the blasted focusring away. But I now have a searchfield in my main window where no setting the focus anywhere make the focusring go away. I find this super annoying.

Here ‘ya go:

SearchBarControl Demo.xojo_binary_project.zip (10.9 KB)

I’m sure it can be improved, but it does the job.

Thank you for sharing.

Do you know if there is an Issue report about this problem? Maybe Xojo can do something to fix it.

@Clifford_Antrim I had this for months and couldn’t find the source or a workaround — thank you!!!

I don’t know, but I will look for one later today. I’ll try to put together a sample project too.

@David_Cox You’re welcome! I know I get a lot more from this forum than I give, so I’m happy to help when I can.

1 Like

https://tracker.xojo.com/xojoinc/xojo/-/issues/81569

1 Like