Skip to main content

DIALOG AND RESOURCEEDITOR

5 replies [Last post]
elie
Offline
Joined: 2008-06-11

Hello,

I was testing the dialog component and i created a theme and set all the components and the dialog too but i was not sure about the body of the dialog where the message is displayed i still getting the bgcolor default and the fgcolor white even if i set dialog.fgcolor = another color then white and dialog.bgcolor other then the default.

Any suggestion?

thank you

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chen

Hi,
Each component has it's own Style object, if you Style the Dialog it
will effect only on the Dialog itself not on the Components within the
Dialog.
Check what Components you placed in the dialog and what are the styles
properties you gave to the Components.
The default values of the theme(bgColor, fgColor, bgSelectionColor, ...)
will be setted to a widget if the theme hasn't override them implicitly.

For example if we have this theme properties declared:

bgColor = 0xFF0000
fgColor = 0x00FF00
bgSelectionColor = 0x00FF00
fgSelectionColor = 0xFF0000
Button.bgColor = 0xFFFFFF

The Button Component will be initialized with the current values:
bgColor = 0xFFFFFF, fgColor = 0x00FF00, bgSelectionColor = 0x00FF00,
fgSelectionColor = 0xFF0000.
The Button Style will contain all the default values and will use the
0xFFFFFF value for the Button bgColor.

Regards,
Chen

lwuit-users@mobileandembedded.org wrote:
> Hello,
>
> I was testing the dialog component and i created a theme and set all the components and the dialog too but i was not sure about the body of the dialog where the message is displayed i still getting the bgcolor default and the fgcolor white even if i set dialog.fgcolor = another color then white and dialog.bgcolor other then the default.
>
> Any suggestion?
>
> thank you
> [Message sent by forum member 'elie' (elie)]
>
> http://forums.java.net/jive/thread.jspa?messageID=280679
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

elie
Offline
Joined: 2008-06-11

i just solve the issue the point is that when we call

Dialog.show("Title", "text","OK", null);

the dialog will be selected and my mistake that i did not set the bgselectioncolor with the rescource editor it was hardcoded. so the solution just set the bgselectioncolor in the resources editor.

elie
Offline
Joined: 2008-06-11

thank you for your reply.
i did set the label argument ( bgolor,transparencey and fgcolor) it did not work.

vuqpham
Offline
Joined: 2008-06-13

I think you have to change the color of the Label. That works for me.

Vu

Shai Almog

Hi Elie,
what sort of dialog are you using?
Do you use the static "show" methods?

The body of the dialog is really a text area component at the moment
so setting the values for text area should produce the desired affect.
We intend to fix this in a future drop so the Dialog style would
behave as you would expect.

As a related note themeing of scrollbars and menus should also be
improved in future releases.

Thanks,
Shai.

> I think you have to change the color of the Label. That works for me.
>
> Vu
> [Message sent by forum member 'vuqpham' (vuqpham)]
>
> http://forums.java.net/jive/thread.jspa?messageID=280739
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net