Community
Participate
Working Groups
Build 20020521 Run the attached test case. Press the tab key. Notice that tabbing is backwards for the CoolBar.
Created attachment 929 [details] test case
Is this going to be fixed? I have a P2 bug that depends on this bug.
Just wait SN returns to work (next Monday 9/9), then I can talk to him about to release the fix.
Here's the fix: CoolItem.java: public void setControl (Control control) { checkWidget (); if (control != null) { if (control.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != parent) error (SWT.ERROR_INVALID_PARENT); } int index = parent.indexOf (this); if (index == -1) return; if (this.control != null && this.control.isDisposed ()) { this.control = null; } Control oldControl = this.control, newControl = control; int hwnd = parent.handle; int hwndChild = 0; if (newControl != null) hwndChild = control.handle; REBARBANDINFO rbBand = new REBARBANDINFO (); rbBand.cbSize = REBARBANDINFO.sizeof; rbBand.fMask = OS.RBBIM_CHILD; rbBand.hwndChild = hwndChild; this.control = newControl; int hwndAbove = 0; if (newControl != null) { hwndAbove = OS.GetWindow (hwndChild, OS.GW_HWNDPREV); } /* * Feature in Windows. When Windows sets the rebar band child, * it makes the new child visible and hides the old child. The * fix is to save and restore the visibility of the controls. */ boolean hideNew = newControl != null && !newControl.getVisible (); boolean showOld = oldControl != null && oldControl.getVisible (); OS.SendMessage (hwnd, OS.RB_SETBANDINFO, index, rbBand); if (hideNew) newControl.setVisible (false); if (showOld) oldControl.setVisible (true); if (hwndAbove != 0 && hwndAbove != hwndChild) { int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE; OS.SetWindowPos (hwndChild, hwndAbove, 0, 0, 0, 0, flags); } }
Related to this is whether or not each item in the cool bar should even be considered as a tab group. Right now tabbing goes to each cool item and arrow keys can be used to move within the items in the cool item. It has been suggested (another PR) that this is not desirable (i.e., the whole coolbar should be treated as one tab group). What is the precedent for the current tabbing behavior? I tried to see what IE did, but couldn't get the tabbing behavior to occur. Thoughts? The other PR indicated that it would take too many tab presses to cycle through the Eclipse widgets if each tab goes to a cool item. I tend to agree with this, especially for WSAD, which has many cool items.
In MSWord, each cool item is treated as a tab group and you use CTRL-TAB to move through the cool items. Tab and arrow keys move amongst the tool items in the cool item. Unable to get tab traversal behavior to work for the coolbar in IE.
Tabbing to each coolitem is fine - expected behavior (other apps do this). Not sure about the Ctrl-Tab vs. Tab behavior. No one else seems to particularly care either, so leave as is. Please fix the backward problem.
Fixed > 20020912 (backward problem only)