Skip to main content
Newcomer
May 10, 2023
Solved

Button selection color

  • May 10, 2023
  • 1 reply
  • 0 views

Currently, there is an option to change the "hover color" on button components. Is there an option to change the color once the button is selected? In my current dashboard, we have multiple buttons and it would be nice if the button a user selects would change colors, then it is apparent they are on that button.

Best answer by EricOsmanski

This would be a good enhancement for IdeaStream. Currently, I have only seen it done by writing a XFBR String BR to change the image. The XFBR String would go in the "Image URL Or Full File Name" on the button.

1 reply

OneStream Employee
May 11, 2023

This would be a good enhancement for IdeaStream. Currently, I have only seen it done by writing a XFBR String BR to change the image. The XFBR String would go in the "Image URL Or Full File Name" on the button.

Newcomer
May 15, 2023

Do you happen to have anything you can share to change the image or example business rule? When we try to create a business rule using literal parameters, it doesn't work. 

OneStream Employee
May 16, 2023

Hello,

First, define the backgroundcolor of your button with something like this : "... BackgroundColor = XFBR(YourBusinessRuleName, YourFunctionName, variable1 = YourVariable) ..."

YourVariable, most likely, could be a parameter that will be set to "true" when you click on your button.

Then, play around with this code in YourBusinessRuleName XFBR below. It will have darkblue color if true, black if false.

 

If (args.FunctionName.XFEqualsIgnoreCase("YourFunctionName")) Then

' Get the variable :
Dim str_variable1 As String = args.NameValuePairs("Variable1")

' Initiate the output : 
Dim buttonColor as string = Nothing

  If str_Variable1 = "True"   Then
buttonColor = "XFDarkBlueBorder"
Else
buttoncolor = "XFBlack"
End If

Return buttonColor 

End If

Regards,