Is there a way to change background color of Data-Shapes UI?

Is there way to change background colour for form and button MultiInput form UI

Hi @eng.minamaged ,

Moved your reply to a new, separate topic since the old one was over 6 years old and also didn’t really overlap with your question :slight_smile:.

To answers your question: I don’t know, but it is build upon Winforms so perhaps searching on that online might help. Also, check out this thread: Data Shapes UI - #6 by GavinCrump

3 Likes

Yes. You need to edit the python node inside the MultiInput node. Scroll down to the bottom of the code and look for (# Make formbody scrollable), then paste these two lines ABOVE it:

form.ForeColor = System.Drawing.Color.FromArgb(IN[13],IN[14],IN[15])
form.BackColor = System.Drawing.Color.FromArgb(IN[10],IN[11],IN[12])

You can replace the IN[#] values with the RGB values you want, or keep them as inputs to be able to change them from Dynamo with string nodes.

ForeColor is basically for the text, BackColor is for the background color.

Keep in mind that you might need to do similar edits in various parts of the code to change the colors of each input method in the Data-Shapes package.

Here’s an example of a custom color window. I had to edit the node’s code to change the colors of the buttons and all the inputs too, not just the background form. By using inputs instead of fixed RGB values I was even able to detect the Windows theme (Dark/Light) using a python script and then feed different colors to the MultiInput node (using If nodes) to match the Windows theme!


3 Likes