GUI Display


I have a row of buttons with a button above to the left to which will load a file.
I have a thumbnail that fits below. When I make the thumbnail visible, for some reason I can’t press the file button, it doesn’t acknowledge it is been clicked. If I simply don’t put addmakevisable for the thumbnail, it works again…I can’t see how they interfere with each other?22
…the drop down menu does constantly work however?


This is solved now…it makes a difference as to the order of where addmakevisiable is placed


It’s probably due to overlapping bounds of your components. If there are no overlaps then the order of addAndMakeVisible() calls shouldn’t make any difference. By default, each call to addAndMakeVisible() places the added child component in front of any existing children. This is probably the effect you’re seeing?


You can specify the z-order of the component you are adding with the second parameter of addAndMakeVisible(), which is described below and is -1 by default

zOrder The index in the child-list at which this component should be inserted. A value of -1 will insert it in front of the others, 0 is the back.

To the JUCE team: perhaps the doc for the zOrder parameter could be copied to the addAndMakeVisible() methods as well?


Yep, that’s a decent suggestion. I’ll do that now.