Skip to main content



      Home
Home » Eclipse Projects » Nebula » To change the color of the image in the cell
To change the color of the image in the cell [message #21749] Tue, 02 January 2007 23:55 Go to next message
Eclipse UserFriend
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 #22019 is a reply to message #21749] Thu, 04 January 2007 11:26 Go to previous messageGo to next message
Eclipse UserFriend
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 #29063 is a reply to message #21749] Tue, 13 February 2007 13:03 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:Maximize problem
Next Topic:[CompositeTable] Header and row control construction
Goto Forum:
  


Current Time: Mon Apr 28 00:51:44 EDT 2025

Powered by FUDForum. Page generated in 0.02845 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top