It is not possible to change the colour used by individual controls in the GUI builder tool.
The customGUI method (which starts off empty) can be used to add additional statements to modify the GUI that was created with the GUI builder e.g.
Main pde
- // Need G4P library
- import g4p_controls.*;
- void setup(){
- size(480, 320);
- createGUI();
- customGUI();
- // Place your setup code here
- }
- void draw(){
- background(230);
- }
- // Use this method to add additional statements
- // to customise the GUI controls
- void customGUI(){
- button3.setLocalColorScheme(GCScheme.GREEN_SCHEME);
- }
gui.pde
- void button3_click1(GButton source, GEvent event) { //_CODE_:button3:235761:
- println("button3 - GButton event occured " + System.currentTimeMillis()%10000000 );
- } //_CODE_:button3:235761:
- // Create all the GUI controls.
- // autogenerated do not edit
- void createGUI(){
- G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
- G4P.messagesEnabled(false);
- G4P.setCursorOff(ARROW);
- if(frame != null)
- frame.setTitle("Sketch Window");
- button3 = new GButton(this, 57, 32, 80, 30);
- button3.setText("Face text");
- button3.addEventHandler(this, "button3_click1");
- }
- // Variable declarations
- // autogenerated do not edit
- GButton button3;
If you wish a new feature that allows the color scheme to be set for individual controls in the GUI builder tool please post it as an issue
here