Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrollbar Steals Focus from Overlayed TextInput #2623

Open
dxmaxwell opened this issue Dec 20, 2019 · 4 comments
Open

Scrollbar Steals Focus from Overlayed TextInput #2623

dxmaxwell opened this issue Dec 20, 2019 · 4 comments

Comments

@dxmaxwell
Copy link
Contributor

I have an OPI with a TextInput control overlayed on a Scrollbar control.

Scrollbar_Issue_CSS46

In CS Studio 4.5, clicking on the TextInput would cause the text field to have focus and allow the user to input a new value.

In CS Studio 4.6, clicking on TextInput activates a pageup/pagedown event on the scrollbar, and the text field do not get focus.

Example OPI file: Scrollbar_Issue_CSS46.opi.zip

@dxmaxwell dxmaxwell added this to the 4.6.0 - testing (master) milestone Dec 20, 2019
@dxmaxwell
Copy link
Contributor Author

I have tested on both Linux (GTK3) and Windows with the same result.

@kasemir
Copy link
Contributor

kasemir commented Dec 20, 2019

For what it's worth, this would for now be OK in the Display Builder running on Phoebus:

tf

But I don't want to guarantee that it'll always function that way, and there is a dedicated 'Spinner' widget, shown at the bottom, for the purpose of having both a text entry and up/down buttons.

In BOY, the reason for the somewhat unpredictably behavior could be that BOY uses a mix of SWT and Draw2D widgets, and who gets a mouse click event when they're layered isn't always clear. I think at one time there was an issue that one type of widget would always show up on top, no matter how you think they should be layered, because again these are different widget technologies.

So if you want to guarantee this behavior in BOY, you might have to implement a 'Spinner' type widget.

@kasemir
Copy link
Contributor

kasemir commented Dec 20, 2019

I think BOY actually has a spinner widget, so how about using that?

@dxmaxwell
Copy link
Contributor Author

We will try to use the spinner widget instead.

For Phoebus, maybe a horizontal option could be considered:

Scrollbar_Text_Alt

Personally I find the buttons on the regular spinner widget too small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants