how to change button colour in adf forms dynamically? - oracle-adf

I want to change my button background color dynamically when there is no data in next page or form?please help me.i am using jdeveloper 11g

Why do you want to change the background color? Instead you can make the button as disabled if there is no data.

Put a conditional EL in the styleclass attribute of the button and refer to a style you defined in your skin:
https://blogs.oracle.com/shay/entry/styling_specific_adf_components_with

Related

How to change selected tab background in codenameone?

I'm doing sample on Tabs and its working fine but here my question how to show differentiate between selected and non selected Tabs in codenameone. it means after selecting Tab i want to show different background color.
how can i achieve this?
Change the background color of the selected state of Tab Uiid in your Codename One Designer.

Trouble changing background color of TextField in Codename One

I just started building my first App with Codename One and I'm having quite some trouble. :-)
I cant change the background color of a TextField, I changed everything in the Theme and named it "TextField". At the Color tab I changed the background color and set Transparency to 255. Since the Component is named TextField, shouldnt the style be applied automatically when I make a new TextField?
I also tried to set the UIID manually to "TextField", which didn't help either.
Am I missing something?
Kind regards,
Max
The way backgrounds work in Codename One is this:
Border is applied first
Then image
Then gradient
Then color
TextField and other components such as Button etc. often have a default border derived from the theme.
Switch to the Border tab, click derive then click the ... button and select empty.

CodeNameOne: Custom dialog theme issue

How can I create a theme for a dialog box?
I was trying to change the border style of the dialog box but the border style applies 2 times for an inner element and for an outer element. I was expected that the border style applies only to the inner element.
To be clearer, as I cannot add image to my post, it seems that the dialog does not consist only from the center box which is showed while dialog is active. The dialog UI consists from a “background form” which usually is transparent and from a container which overlay over the background form. The last mentioned container contains de graphic representation of the “dialog box”.
My issue is that I can not apply my style only to the container which contains the dialog box but the style applies also to the background form.
How can I apply the border style only to the dialog box container element?
Any additional tips will be highly appreciated.
Thanks.
How are you applying the style? Are you using the theme to apply a style to the Dialog UIID as explained here.
Using setStyle or getStyle on a dialog component would be problematic and would not result in proper styling (you might get away with doing it on getDialogComponent but you should work with the theme).
Notice that to style a dialog you should use Dialog, DialogTitle & DialogBody UIID's and quite a few theme constants.
Thanks Shai,
is clear now.
I’m doing a custom dialog starting from the BlankDialog element provided in designer.
Because I started from BlankDialog I thought that overriding only UIID theme is enough.
I understood the BlankDialog structure wrongly thinking that is a simple empty form because is named "Blank…"
Is clear now that for every new UI object added, I should check if it has any other UI child to be customized together with the parent.
Thanks again.

How to change the BarButtonItem back color?

I am currently working in the C# windows application with DevExpress controls.
Now I want to change back color of bar button item while loading the form.
I've tried following code:
barButton.Appearance.BackColor = Color.Red;
but the bar button back color not changed to red.
By default, bars use the skins to draw their content. In this case, all background colors are provided by specific skin elements, which cannot be changed. The only way to change a specific item's background color is to disable skins:
put the BarAndDockingController component onto a form, and assign it to the BarManager.Controller property. Set BarAndDockingController.PaintStyleName or LookAndFeel to any non-skin style(for example "Flat"). Then use the Bar.Appearance.BackColor property to set the desired color.
Alternatively, you can create your own custom barItem in a way similar to the one described in the How to change the background color of highlighted links KB article.

Add image to Checkbox in winforms

I have a Image path(some thing like this "http://ABC/XYZ/PQR.gif").And I want to assign this image to checkbox in winforms using C#.winfroms checkbox does not have SRC,How can I assign this image to checkbox.?
The Background of a check box can be filled with a provided image.
See
CheckBox Overview
CheckBox Members
Control.BackgroundImage Property
Try this
Set the BackGroundImage Property.
Change the BackGroundImageLayout
Property to stretch.
Change the Font Color if required

Resources