How can I set the image and text for the toolbarButton?

gui
#1

I plan to create three toolbarButton:“setting”,“save” and “stop”,but I don’t konw how to set the image and text for it. I had saw the document and examples, but I still can’t create the toolbarButton correctly.
I don’t understand the third parameter and how to use it.


Besides, when i tried to create it according to the juce demo:WidgetsDemo.h, the error is the function doesn’t defined.

I wish someone can give me some advice, thank you very much.

0 Likes

#2

Have you try to :
#include “…/…/…/Assets/DemoUtilities.h”

0 Likes

#3

It prompts this When I include :

0 Likes

#4

It’s seem’s like a path problem…

1 Like

#5

Thank you for your advice, I had solved part of this problem by changing the resourcePath.
Now, the image can present ,but can’t see the text(the name of the button). Do you know how to present it?

1 Like

#6

Haha, this is the point. :grinning:

0 Likes

#7

is it ok ?

0 Likes

#8

Yes, it can present image normally by changing the path. Thank you so much.

0 Likes