Community
Participate
Working Groups
Build 200207161002 1. Load the test case code. 2. Put a breakpoint on this line in the Button handler: coolBar.setWrapIndices(new int[] {0, 1, 5}); 3. Debug the test case. Size the outer Eclipse workbench window so that it does not overlap the test window. 4. Press "Set Wraps". 5. When the breakpoint is hit, step into the CoolBar.setWrapIndices() method. 6. Step through the method. When OS.RB_SETBANDINFO is sent for item i = 1, the coolbar rows are collapsed into 1 row. This behavior is unnecessary and leads to quite noticeable resizing "flash" (i.e., you can see the rows collapse than expand) in Eclipse when I do a similar scenario. Since the first two wrap indices are the same as the current wrap indices, I would not expect this collapsing/expanding of the coolbar rows.
where is the testcase ? or should I get anyone that use setWraps ?
Lynne, there is no much we can do about this. For the OS we have to set the wraps one by one. The best you can get is no flashing in the case where you are setting the wraps exactly for the same indices. Anyway, for this case the best strategy is using setRedraw: coolBar.setRedraw(false); coolBar.setWrapIndices(wraps); coolBar.setRedraw(true); Another thing SWT could do is setRedraw internally inside the setWrapIndices. So the app don't need to care about this.
Okay, I guess you were able to reproduce the behavior, so I don't need to attach the test case?
Don't worry about the testcase. It would be bad for you using setRedraw surrounding the setWrapIndices, or should I talk to SN about doing this internally ?
I would prefer if it could be done internally by SWT. The UI code that deals with the Coolbar has a number of workarounds/quirks already - I'd prefer not to add more if at all possible.
Fixed in R2.0.1.
fix in the HEAD > 20020813