Results 1 to 1 of 1
- 08-03-2009, 09:04 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 1
- Rep Power
- 0
CCombo problematic when applied to the reasizable Table column
Hi,
i have added a ccombo in a SWT Table. The problem is when user resizes the the table column the CCombo doesnt resize (works fine if the width is increased).
The problem is when shrinks the column then it doesnot resizes properly, the ui looks like the column is shrinked but the ccombo is bigger than width of the Table column.
please see the code below:
// Create the dropdown and add data to it
final CCombo combo = new CCombo(table, SWT.READ_ONLY);
for (int i = 0, n = options.length; i < n; i++) {
combo.add(options[i]);
}
// Select the previously selected item from the cell
combo.select(combo.indexOf(item.getText(column)));
// Compute the width for the editor
// Also, compute the column width, so that the dropdown fits
editor.minimumWidth = combo.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
table.getColumn(column).setWidth(editor.minimumWid th);
// Set the focus on the dropdown and set into the editor
combo.setFocus();
editor.setEditor(combo, tableitem, 1);
Similar Threads
-
[SOLVED] How do you align/justify idividual table column header text?
By Angie in forum New To JavaReplies: 4Last Post: 02-05-2011, 07:47 PM -
Non-Editable Table Column
By ld_pvl in forum AWT / SwingReplies: 6Last Post: 08-03-2009, 07:35 PM -
How to insert a SWT table column at an index
By Java Tip in forum SWT TipsReplies: 0Last Post: 07-11-2008, 05:30 PM -
Sorting a SWT table by column
By Java Tip in forum SWT TipsReplies: 0Last Post: 07-11-2008, 04:07 PM -
minimum word length in search problematic
By jocassid in forum Suggestions & FeedbackReplies: 3Last Post: 07-01-2008, 05:24 AM
Bookmarks