Neil Sands
Neil Sands

Reputation: 173

In GWT, how do I control how a widget is decorated to show it's got the focus?

In general terms, how do I control in GWT the decoration that gets put on a widget, e.g. a TextBox, to show that it's the widget that's focussed? Google Chrome for example illuminates focussed widgets with a sort of orange border with round corners, but it's not the same border that you can control with the border instruction in CSS. (border: 3px black inset or whatever).

Specifically, I've got an HTML widget wrapped in a FocusPanel. I want the FocusPanel to respond to keypresses, which it does, but I want it to do it invisibly, without the orange border I mentioned in Google Chrome when I do FocusPanel.setFocus(true);.

Thanks! Neil

Upvotes: 0

Views: 2161

Answers (1)

Hilbrand Bouwkamp
Hilbrand Bouwkamp

Reputation: 13519

You can remove the red border by setting the css outline to 0. See: how to remove the focus on disclosure panel's header?

Upvotes: 6

Related Questions