MidiKeyboardComponent becoming opaque in the dark

Today I was trying to display a MidiKeyboardComponent with alpha in the background when I found out it was becoming misteriously opaque at some point. This is the code:

void MidiKeyboardComponent::colourChanged()
    setOpaque (findColour (whiteNoteColourId).isOpaque());

Personally, I think that the “setOpaque (findColour (whiteNoteColourId).isOpaque());” line should be removed… It can be very confusing and for those seeking more efficiency the setOpaque method is always there…

What do you think?

It’s possible to change the whiteNoteColourId by calling setColour on the component. You have full control over the opaqueness of that colour so you can also control the opaqueness of the MidiKeyboardComponent, right?

I have trouble with the syntax on this still. I have been trying for a while now.

What have you tried? Something like this should work:

keyboard.setColour (juce::MidiKeyboardComponent::whiteNoteColourId,

It’s easier to help if you explain what you’ve tried, and the exact text of any errors that you’ve encountered.

I am taking a C++ tutorial now. I really had trouble with the syntax. but, also I think I just didn’t know my way around C++. If I still have the same question after this I will return.
Also I have tried that as well. I am having trouble accessing different parts of JUCE via code. I just need to hop in. I don’t code in C++ yet.

Thank you for your reply REUK