Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » How to specify text color for Gallery Item
How to specify text color for Gallery Item [message #30217] Tue, 27 February 2007 12:23 Go to next message
Eclipse UserFriend
Originally posted by: swetha.atc.tcs.co.in

Hi All,

I am using Gallery Widget to display the list of images....I am facing
the following problems........

1... If the grid item text is big one.. the name is not completely
visible...I don't want to increase the size of image...because if I
increase it it looks like blurred image.

2.... If I select the gallery item the name is not visible...how to change
the text color of the item..

3... All the gallery items are added to one Parent gallery item(like
Group header)...what to do if I don't want to show the group name...I just
want to display all the child items...

Please help me in these points....

Thanks in advance,
Swetha
Re: How to specify text color for Gallery Item [message #30252 is a reply to message #30217] Tue, 27 February 2007 13:35 Go to previous messageGo to next message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi Swetha,

1 : If you want some special rendering, you can copy the ItemRenderer
you use and make your own. But first, did you try to set a bigger width
than height ? See groupRenderer.setItemWidth() and
groupRenderer.setItemHeight() ?


2 : This widget uses system colors so the text should always be visible.
Anyway, you can also solve this problem by using a custom ItemRenderer
and set another color.
Maybe I should add a way to set the text color in the default item
renderers.


3 : Its an easy one, just set NoGroupRenderer as the groupRenderer
gallery.setGroupRenderer( new NoGroupRenderer() ) ;

--
Nicolas

Swetha a écrit :
> Hi All,
>
> I am using Gallery Widget to display the list of images....I am
> facing the following problems........
>
> 1... If the grid item text is big one.. the name is not completely
> visible...I don't want to increase the size of image...because if I
> increase it it looks like blurred image.
>
> 2.... If I select the gallery item the name is not visible...how to
> change the text color of the item..
>
> 3... All the gallery items are added to one Parent gallery item(like
> Group header)...what to do if I don't want to show the group name...I
> just want to display all the child items...
>
> Please help me in these points....
>
> Thanks in advance,
> Swetha
>
>
>
>
>
Re: How to specify text color for Gallery Item [message #30707 is a reply to message #30252] Fri, 02 March 2007 05:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: swetha.yahoo.co.in

Hi,

Can you please give me an idea on how to set the text color for the
gallery item when I select it...Because when I select a gallery item its
text is not visible...

If I change the text color to other than Dark_Blue , text is visible...

I want the selection color is Dark_Blue only...Can u tell how to proceed ..

Thanks,
Swetha
Re: How to specify text color for Gallery Item [message #30742 is a reply to message #30707] Sat, 03 March 2007 21:42 Go to previous messageGo to next message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi,

I just added getters and setters for colors on item renderers.
See DefaultItemRenderer.setSelectionColor and setForegroundColor

--
Nicolas

Swetha a écrit :
> Hi,
>
> Can you please give me an idea on how to set the text color for the
> gallery item when I select it...Because when I select a gallery item its
> text is not visible...
>
> If I change the text color to other than Dark_Blue , text is visible...
>
> I want the selection color is Dark_Blue only...Can u tell how to proceed ..
>
> Thanks,
> Swetha
>
Re: How to specify text color for Gallery Item [message #31131 is a reply to message #30742] Thu, 08 March 2007 08:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: swetha.yahoo.co.in

Hi,

DefaultItemRenderer.setForegroundColor sets the color to all the items
in Gallery.

My need is only for selected gallery item I want to change the
foreground color of gallery item as WHITE because when the selection color
is Blue, its text is not visible... that's why I want to set the selected
item foreground color as White..

If I set DefaultItemRenderer.setForegroundColor(White), the
remaining items text is not visible...except the selected item..

Thanks in advance,
Swetha.
Re: How to specify text color for Gallery Item [message #31165 is a reply to message #31131] Thu, 08 March 2007 09:41 Go to previous messageGo to next message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi,

Added setSelectionForegroundColor

And you can now use the keyboard to move selection. :-)

--
Nicolas

Swetha a écrit :
> Hi,
>
> DefaultItemRenderer.setForegroundColor sets the color to all the
> items in Gallery.
>
> My need is only for selected gallery item I want to change the
> foreground color of gallery item as WHITE because when the selection
> color is Blue, its text is not visible... that's why I want to set the
> selected item foreground color as White..
>
> If I set DefaultItemRenderer.setForegroundColor(White), the
> remaining items text is not visible...except the selected item..
>
> Thanks in advance,
> Swetha.
>
Re: How to specify text color for Gallery Item [message #31200 is a reply to message #31165] Thu, 08 March 2007 11:02 Go to previous message
Eclipse UserFriend
Originally posted by: swetha.yahoo.co.in

Hi,
Thank you very much...

Swetha
Re: How to specify text color for Gallery Item [message #579137 is a reply to message #30217] Tue, 27 February 2007 13:35 Go to previous message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi Swetha,

1 : If you want some special rendering, you can copy the ItemRenderer
you use and make your own. But first, did you try to set a bigger width
than height ? See groupRenderer.setItemWidth() and
groupRenderer.setItemHeight() ?


2 : This widget uses system colors so the text should always be visible.
Anyway, you can also solve this problem by using a custom ItemRenderer
and set another color.
Maybe I should add a way to set the text color in the default item
renderers.


3 : Its an easy one, just set NoGroupRenderer as the groupRenderer
gallery.setGroupRenderer( new NoGroupRenderer() ) ;

--
Nicolas

Swetha a écrit :
> Hi All,
>
> I am using Gallery Widget to display the list of images....I am
> facing the following problems........
>
> 1... If the grid item text is big one.. the name is not completely
> visible...I don't want to increase the size of image...because if I
> increase it it looks like blurred image.
>
> 2.... If I select the gallery item the name is not visible...how to
> change the text color of the item..
>
> 3... All the gallery items are added to one Parent gallery item(like
> Group header)...what to do if I don't want to show the group name...I
> just want to display all the child items...
>
> Please help me in these points....
>
> Thanks in advance,
> Swetha
>
>
>
>
>
Re: How to specify text color for Gallery Item [message #579488 is a reply to message #30252] Fri, 02 March 2007 05:27 Go to previous message
Swetha is currently offline SwethaFriend
Messages: 68
Registered: July 2009
Member
Hi,

Can you please give me an idea on how to set the text color for the
gallery item when I select it...Because when I select a gallery item its
text is not visible...

If I change the text color to other than Dark_Blue , text is visible...

I want the selection color is Dark_Blue only...Can u tell how to proceed ..

Thanks,
Swetha
Re: How to specify text color for Gallery Item [message #579503 is a reply to message #30707] Sat, 03 March 2007 21:42 Go to previous message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi,

I just added getters and setters for colors on item renderers.
See DefaultItemRenderer.setSelectionColor and setForegroundColor

--
Nicolas

Swetha a écrit :
> Hi,
>
> Can you please give me an idea on how to set the text color for the
> gallery item when I select it...Because when I select a gallery item its
> text is not visible...
>
> If I change the text color to other than Dark_Blue , text is visible...
>
> I want the selection color is Dark_Blue only...Can u tell how to proceed ..
>
> Thanks,
> Swetha
>
Re: How to specify text color for Gallery Item [message #579729 is a reply to message #30742] Thu, 08 March 2007 08:14 Go to previous message
Swetha is currently offline SwethaFriend
Messages: 68
Registered: July 2009
Member
Hi,

DefaultItemRenderer.setForegroundColor sets the color to all the items
in Gallery.

My need is only for selected gallery item I want to change the
foreground color of gallery item as WHITE because when the selection color
is Blue, its text is not visible... that's why I want to set the selected
item foreground color as White..

If I set DefaultItemRenderer.setForegroundColor(White), the
remaining items text is not visible...except the selected item..

Thanks in advance,
Swetha.
Re: How to specify text color for Gallery Item [message #579752 is a reply to message #31131] Thu, 08 March 2007 09:41 Go to previous message
Nicolas Richeton is currently offline Nicolas RichetonFriend
Messages: 179
Registered: July 2009
Senior Member
Hi,

Added setSelectionForegroundColor

And you can now use the keyboard to move selection. :-)

--
Nicolas

Swetha a écrit :
> Hi,
>
> DefaultItemRenderer.setForegroundColor sets the color to all the
> items in Gallery.
>
> My need is only for selected gallery item I want to change the
> foreground color of gallery item as WHITE because when the selection
> color is Blue, its text is not visible... that's why I want to set the
> selected item foreground color as White..
>
> If I set DefaultItemRenderer.setForegroundColor(White), the
> remaining items text is not visible...except the selected item..
>
> Thanks in advance,
> Swetha.
>
Re: How to specify text color for Gallery Item [message #579779 is a reply to message #31165] Thu, 08 March 2007 11:02 Go to previous message
Swetha is currently offline SwethaFriend
Messages: 68
Registered: July 2009
Member
Hi,
Thank you very much...

Swetha
Previous Topic:Cancelling PShelf selection
Next Topic:Gallery screenshots
Goto Forum:
  


Current Time: Fri Apr 19 07:33:12 GMT 2024

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

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

Back to the top