problem in table selection color [message #441760] |
Tue, 24 August 2004 06:06 |
Eclipse User |
|
|
|
Originally posted by: david_danie.hotmail.com
Hi Friends,
I want to set the background color for each table's rows. So i used
setBackround(Color.gray) method in TableItem and i am not doing anything
for selection color. So i am expecting the default selection color(blue)
in the selected row.but whenever i select the row the selection color is
not changed it always shows with gray color.
any solution?
Thanks,
David Danie.
|
|
|
|
Re: problem in table selection color [message #441859 is a reply to message #441825] |
Thu, 26 August 2004 10:22 |
Eclipse User |
|
|
|
Originally posted by: david_danie.hotmail.com
Yes. You are correct.
The selection shown in blue only if table have the focus.
But if i edit the column in the table the selection shown in gray not in
blue.
Thanks,
David Danie.
Veronika Irvine wrote:
> The following example works for me. Note that when the table does not have
> focus, the selection is not shown in blue but in a light gray (on Windows
> 2000). Alternatively you can create a table with SWT.HIDE_SELECTION to not
> show the selection at all when the table does not have focus.
>
> public static void main (String [] args) {
> Display display = new Display ();
> Color gray = display.getSystemColor(SWT.COLOR_GRAY);
> Shell shell = new Shell (display);
> shell.setLayout(new FillLayout());
> Table table = new Table(shell, SWT.BORDER);
> //Table table = new Table(shell, SWT.BORDER | SWT.HIDE_SELECTION);
> for (int i = 0; i < 10; i++) {
> TableItem item = new TableItem(table, SWT.NONE);
> item.setText("item "+i);
> item.setBackground(gray);
> }
> shell.open ();
> while (!shell.isDisposed ()) {
> if (!display.readAndDispatch ()) display.sleep ();
> }
> display.dispose ();
> }
>
>
> "David Danie" <david_danie@hotmail.com> wrote in message
> news:cgelo7$rgt$1@eclipse.org...
>
>>Hi Friends,
>> I want to set the background color for each table's rows. So i used
>>setBackround(Color.gray) method in TableItem and i am not doing anything
>>for selection color. So i am expecting the default selection color(blue)
>>in the selected row.but whenever i select the row the selection color is
>>not changed it always shows with gray color.
>>
>>any solution?
>>
>>Thanks,
>>David Danie.
>>
>
>
>
|
|
|
Re: problem in table selection color [message #441860 is a reply to message #441825] |
Thu, 26 August 2004 10:39 |
Eclipse User |
|
|
|
Originally posted by: david_danie.hotmail.com
Yes. You are correct.
The selection shown in blue only if table have the focus.
But if i edit the column in the table the selection shown in gray not in
blue.
Thanks,
David Danie.
Veronika Irvine wrote:
> The following example works for me. Note that when the table does not have
> focus, the selection is not shown in blue but in a light gray (on Windows
> 2000). Alternatively you can create a table with SWT.HIDE_SELECTION to not
> show the selection at all when the table does not have focus.
>
> public static void main (String [] args) {
> Display display = new Display ();
> Color gray = display.getSystemColor(SWT.COLOR_GRAY);
> Shell shell = new Shell (display);
> shell.setLayout(new FillLayout());
> Table table = new Table(shell, SWT.BORDER);
> //Table table = new Table(shell, SWT.BORDER | SWT.HIDE_SELECTION);
> for (int i = 0; i < 10; i++) {
> TableItem item = new TableItem(table, SWT.NONE);
> item.setText("item "+i);
> item.setBackground(gray);
> }
> shell.open ();
> while (!shell.isDisposed ()) {
> if (!display.readAndDispatch ()) display.sleep ();
> }
> display.dispose ();
> }
>
>
> "David Danie" <david_danie@hotmail.com> wrote in message
> news:cgelo7$rgt$1@eclipse.org...
>
>>Hi Friends,
>> I want to set the background color for each table's rows. So i used
>>setBackround(Color.gray) method in TableItem and i am not doing anything
>>for selection color. So i am expecting the default selection color(blue)
>>in the selected row.but whenever i select the row the selection color is
>>not changed it always shows with gray color.
>>
>>any solution?
>>
>>Thanks,
>>David Danie.
>>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03252 seconds