How to specify text color for Gallery Item [message #30217] |
Tue, 27 February 2007 07:23  |
Eclipse User |
|
|
|
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 #579137 is a reply to message #30217] |
Tue, 27 February 2007 08:35  |
Eclipse User |
|
|
|
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 00:27  |
Eclipse User |
|
|
|
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 16:42  |
Eclipse User |
|
|
|
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 03:14  |
Eclipse User |
|
|
|
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 04:41  |
Eclipse User |
|
|
|
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.
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.32890 seconds