Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Getting tab stops correct
Mon, Feb 10 2020 7:54 AMPermanent Link

Matthew Jones

I have a form which has some "slider" controls on, which is basically just made of panels. I need to have the "thumb" controllable using keyboard, so I need a component that can get focus.

The way I've done this is to have the slider be a form, and so I can have any number of them. The forms are on a panel, and under the panel is another panel with some edit boxes and a button.

The problem is that if I click on the thumb which is a button, and then press Tab, it ignores all the other buttons and goes to the edit boxes, and then through the button at the bottom, and then back to the edit boxes, never considering the buttons on the slider forms again.

There is a TabStop on most panels, and that is set, but there is none for the form and thus not for the slider form. Not sure that's too relevant, but it might be?

Anyone know how to take control of the tab stops so that I can make this work?

Part of the problem is that on loading the focus gets set to the edit box, which means that it might scroll to show it, and thus hide important text at the top. Even setting ScrollTop doesn't help this.

--

Matthew Jones
Mon, Feb 10 2020 5:27 PMPermanent Link

erickengelke

Avatar

"Matthew Jones" wrote:

> I have a form which has some "slider" controls on, which is basically just made of panels.
> I need to have the "thumb" controllable using keyboard, so I need a component that can get focus.

The tab handling is often a challenge, especially when you are writing for persons with special needs and mousing isn't possible.

One solution is to put buttons on the form as 'notebook tabs'.  Then  set Visible on just the fields you want to show in the current notebook page, with responsive design drawing them onto the form.   

Erick
EWB Programming Books and Component Library
http://www.erickengelke.com
Wed, Feb 19 2020 1:10 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< I have a form which has some "slider" controls on, which is basically just made of panels. I need to have the "thumb" controllable using keyboard, so I need a component that can get focus.

The way I've done this is to have the slider be a form, and so I can have any number of them. The forms are on a panel, and under the panel is another panel with some edit boxes and a button. >>

Using forms/panels for the control is going to be cumbersome, for the simple reason that the dispatching isn't going to work quite right.  What you really need is a custom control that uses a UI element for the slider and buttons and has all of the UI events for those elements (at least the one's that the buttons aren't interested in) routed to the outer control.

I'm super-busy right now with the looming beta, but I'll see if I can put together an example of this.  In the meantime, the closest example that is in the component library already is the TEditComboButton/TEditComboControl controls in the WebEdits unit.  They show how to create child buttons that can forward events to the parent control via their DispatchEvent method.  Combine two similar button controls with an extra element/child control for the slider, and you will be able to do everything that you want in an encapsulated control.

Tim Young
Elevate Software
www.elevatesoft.com
Image