Question

I'm trying to set the background color of an Action Pane Button so I changed the init-Method to this:

public void  init()
{
    super();
    myButton.colorScheme(FormColorScheme::RGB);
    myButton.backgroundColor(WinAPI::RGB2int(255,0,0));
}

but myButton (AutoDeclaration is on) does not become red.

Even when I set these properties by hand, the color does not change. The Button has an Action, where the Image is defined. But removing that won't help.

Was it helpful?

Solution

It isn't possible to provide a custom background color for buttons in the action pane.

If you just want the button to look different, you can set the ToogleButton property to Check and the ToggleValue property to On to give it a difference appearance, you will also need to add code in the clicked method for the button to prevent it toggling to Off. This will give the button a different background color, but you won't have any control over the color used.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top