To change the color of the image in the cell [message #21749] |
Tue, 02 January 2007 23:55  |
Eclipse User |
|
|
|
Originally posted by: krishna_24jan.yahoomail.com
Hi,
Iam adding an image in a grid item by using griditem.setImage.
Now i want to change the color of the image with out changing the image.
Iam trying to use gridItem.setForeground but its not working.
Can i dynamically draw the image in the cell.Imean if i want a round image
can i dynamically draw in the code with out statically placing the image..?
or any other suggestions to sove my problem..?
Thanks in advance
krishna
|
|
|
|
Re: To change the color of the image in the cell [message #29063 is a reply to message #21749] |
Tue, 13 February 2007 13:03  |
Eclipse User |
|
|
|
you have to create the image with the different color on your own.
BR,
surya.
krishna wrote:
> Hi,
>
> Iam adding an image in a grid item by using griditem.setImage.
>
> Now i want to change the color of the image with out changing the image.
>
> Iam trying to use gridItem.setForeground but its not working.
>
> Can i dynamically draw the image in the cell.Imean if i want a round
> image can i dynamically draw in the code with out statically placing
> the image..?
>
> or any other suggestions to sove my problem..?
>
>
>
> Thanks in advance
> krishna
>
|
|
|
Re: To change the color of the image in the cell [message #573872 is a reply to message #21749] |
Thu, 04 January 2007 11:26  |
Eclipse User |
|
|
|
The Grid will not alter the image for you. You can create your own
image and then set it to the item. For example:
Image image = new Image(display,16,16);
GC gc = new GC(image);
//draw stuff
gc.dispose();
gridItem.setImage(2,image);
-Chris
krishna wrote:
> Hi,
>
> Iam adding an image in a grid item by using griditem.setImage.
>
> Now i want to change the color of the image with out changing the image.
>
> Iam trying to use gridItem.setForeground but its not working.
>
> Can i dynamically draw the image in the cell.Imean if i want a round
> image can i dynamically draw in the code with out statically placing the
> image..?
>
> or any other suggestions to sove my problem..?
>
>
>
> Thanks in advance
> krishna
>
|
|
|
Re: To change the color of the image in the cell [message #578500 is a reply to message #21749] |
Tue, 13 February 2007 13:03  |
Eclipse User |
|
|
|
you have to create the image with the different color on your own.
BR,
surya.
krishna wrote:
> Hi,
>
> Iam adding an image in a grid item by using griditem.setImage.
>
> Now i want to change the color of the image with out changing the image.
>
> Iam trying to use gridItem.setForeground but its not working.
>
> Can i dynamically draw the image in the cell.Imean if i want a round
> image can i dynamically draw in the code with out statically placing
> the image..?
>
> or any other suggestions to sove my problem..?
>
>
>
> Thanks in advance
> krishna
>
|
|
|
Powered by
FUDForum. Page generated in 0.02845 seconds