Thanks again for the fast reply! So I tried a bit more and found another strange behaviour. Probably it is the same bug. Whenever I use any of the elements within a panel (slider, option, button) it disables the elements outside of the panel. If I drag the panel around, the outside elements are enabled again. Here is the code:
main
import g4p_controls.*;
GPanel modul_2;
public void setup(){
size(200, 200, JAVA2D);
createGUI();
}
public void draw(){
background(127);
}
gui
public void button1_click1(GButton source, GEvent event) { //_CODE_:button1:570995:
println("button1 - GButton >> GEvent." + event + " @ " + millis());
} //_CODE_:button1:570995:
public void panel1_Click1(GPanel source, GEvent event) { //_CODE_:panel1:957461:
println("panel1 - GPanel >> GEvent." + event + " @ " + millis());
} //_CODE_:panel1:957461:
public void slider1_change1(GSlider source, GEvent event) { //_CODE_:slider1:643990:
println("slider1 - GSlider >> GEvent." + event + " @ " + millis());
} //_CODE_:slider1:643990:
public void option1_clicked1(GOption source, GEvent event) { //_CODE_:option1:420023:
println("option1 - GOption >> GEvent." + event + " @ " + millis());
} //_CODE_:option1:420023:
public void option2_clicked1(GOption source, GEvent event) { //_CODE_:option2:953345:
println("option2 - GOption >> GEvent." + event + " @ " + millis());
} //_CODE_:option2:953345:
public void button2_click1(GButton source, GEvent event) { //_CODE_:button2:750552:
println("button2 - GButton >> GEvent." + event + " @ " + millis());
} //_CODE_:button2:750552:
public void slider2_change1(GSlider source, GEvent event) { //_CODE_:slider2:558167:
println("slider2 - GSlider >> GEvent." + event + " @ " + millis());
} //_CODE_:slider2:558167:
public void option3_clicked1(GOption source, GEvent event) { //_CODE_:option3:644481:
println("option3 - GOption >> GEvent." + event + " @ " + millis());
} //_CODE_:option3:644481:
public void option4_clicked1(GOption source, GEvent event) { //_CODE_:option4:383928:
println("option4 - GOption >> GEvent." + event + " @ " + millis());
} //_CODE_:option4:383928:
public void button3_click1(GButton source, GEvent event) { //_CODE_:button3:886551:
println("button3 - GButton >> GEvent." + event + " @ " + millis());
} //_CODE_:button3:886551:
// Create all the GUI controls.
// autogenerated do not edit
public void createGUI(){
G4P.messagesEnabled(false);
G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
G4P.setMouseOverEnabled(false);
surface.setTitle("Sketch Window");
button1 = new GButton(this, 10, 10, 80, 30);
button1.setText("B1");
button1.addEventHandler(this, "button1_click1");
panel1 = new GPanel(this, 10, 50, 90, 140, "Tab bar text");
panel1.setCollapsible(false);
panel1.setText("Tab bar text");
panel1.setOpaque(true);
panel1.addEventHandler(this, "panel1_Click1");
slider1 = new GSlider(this, 40, 30, 100, 30, 10.0);
slider1.setRotation(PI/2, GControlMode.CORNER);
slider1.setLimits(0.5, 0.0, 1.0);
slider1.setNumberFormat(G4P.DECIMAL, 2);
slider1.setOpaque(false);
slider1.addEventHandler(this, "slider1_change1");
togGroup1 = new GToggleGroup();
option1 = new GOption(this, 50, 80, 30, 20);
option1.setIconAlign(GAlign.LEFT, GAlign.MIDDLE);
option1.setText("1");
option1.setOpaque(false);
option1.addEventHandler(this, "option1_clicked1");
option2 = new GOption(this, 50, 110, 30, 20);
option2.setIconAlign(GAlign.LEFT, GAlign.MIDDLE);
option2.setText("2");
option2.setOpaque(false);
option2.addEventHandler(this, "option2_clicked1");
togGroup1.addControl(option1);
option1.setSelected(true);
panel1.addControl(option1);
togGroup1.addControl(option2);
panel1.addControl(option2);
button2 = new GButton(this, 50, 30, 30, 30);
button2.setText("B1");
button2.addEventHandler(this, "button2_click1");
panel1.addControl(slider1);
panel1.addControl(button2);
slider2 = new GSlider(this, 150, 80, 100, 30, 10.0);
slider2.setRotation(PI/2, GControlMode.CORNER);
slider2.setLimits(0.5, 0.0, 1.0);
slider2.setNumberFormat(G4P.DECIMAL, 2);
slider2.setOpaque(false);
slider2.addEventHandler(this, "slider2_change1");
togGroup2 = new GToggleGroup();
option3 = new GOption(this, 160, 130, 30, 20);
option3.setIconAlign(GAlign.LEFT, GAlign.MIDDLE);
option3.setText("3");
option3.setOpaque(false);
option3.addEventHandler(this, "option3_clicked1");
option4 = new GOption(this, 160, 160, 30, 20);
option4.setIconAlign(GAlign.LEFT, GAlign.MIDDLE);
option4.setText("4");
option4.setOpaque(false);
option4.addEventHandler(this, "option4_clicked1");
togGroup2.addControl(option3);
option3.setSelected(true);
togGroup2.addControl(option4);
button3 = new GButton(this, 160, 80, 30, 30);
button3.setText("B3");
button3.addEventHandler(this, "button3_click1");
}
// Variable declarations
// autogenerated do not edit
GButton button1;
GPanel panel1;
GSlider slider1;
GToggleGroup togGroup1;
GOption option1;
GOption option2;
GButton button2;
GSlider slider2;
GToggleGroup togGroup2;
GOption option3;
GOption option4;
GButton button3;