Hello,
I’ve two question totally differents :
-
The grey border around the window :
Is it a method to remove the window border ? I know you can use setBackgroundColour(const juce::Colour &newColour) on a DocumentWindow, but what about the (1pixel?) border around ? -
The ImageButton :
I want to use purely image button, but in a case of a group (setRadioGroupId(const int newGroupId)) that allow to have only one of theses buttons in On state at time.
The documentation indicate : all the buttons for a particular group must be placed inside the same parent component. So to be sure the ImageButton(s) was add into a single Component (the ImageButton group).
Component* group = new Component(T("group"));
group->setBounds(0, 0, WINDOW_WIDTH, TOP_HEIGHT);
addAndMakeVisible(group);
buttonHome = new ImageButton(T("HomeButton"));
buttonHome->setImages(true, true, true,
buttonHomeOff, 0.8f, Colours::transparentBlack,
buttonHomeOff, 1.0f, Colours::transparentBlack,
buttonHomeOn, 1.0f, Colours::transparentBlack
);
group->addAndMakeVisible(buttonHome);
buttonHome->setTopLeftPosition(36, 0);
buttonHome->setTooltip(T("Home - Go to the navigation panel"));
buttonHome->setClickingTogglesState(true);
buttonHome->setRadioGroupId(23456);
buttonHome->addButtonListener(this);
...
My seven buttons works and the image change when over or down.
My problem is simple, I can’t have the TogglesState property (setClickingTogglesState(true)) on my group. I want to have only one button in the stateOn at the same time (with the same image that the button down (buttonHomeOn))
Perhaps the ImageButton is not really a ToggleButton, but when i read the demo source code, the radiobutton section of the WidgetsDemo.cpp, i see that Juce allow the ToogleState & RadioGroupId on the ToggleButton/DrawableButton/TextButton ? What about the ImageButton ?
Thank you in advance.
Max