A GUI (graphical user interface) library for processing.
Questions tagged [control-p5]
55 questions
3
votes
1 answer
Alter Textfield functionality ControlP5
I would like to remove some of the functionality of a Textfield.
When the enter or return keys are pressed, the field becomes empty. I would like the value entered to stay within the field.
I have tried overriding the submit method but this hasn't…

MLast
- 60
- 7
3
votes
2 answers
Processing Resize Window and have buttons dynamically take up available space
I am using processing to display a number of buttons with the ControlP5 API. At the moment I can get the buttons to display in the window of the sketch but when I resize the frame the button positions do not update, Is there a simple way to redraw…

Simon Hillary
- 213
- 1
- 4
- 12
3
votes
1 answer
Control P5 - Display numbers in Button labels
I am creating a number pad using Processing. I am using a tablet and the controlP5 library for the gui, then sending the value to an arduino. I'm having an issue naming my buttons with numbers. Here is my code to create…

Kyrillios
- 33
- 5
2
votes
1 answer
How to let ControlP5 Dropodownlist open up instead of down?
Using this MWE from the documentation:
import controlP5.*;
import java.util.*;
ControlP5 cp5;
void setup() {
size(400, 400);
cp5 = new ControlP5(this);
List l = Arrays.asList("a", "b", "c", "d", "e", "f", "g", "h");
/* add a…

Tea Tree
- 882
- 11
- 26
2
votes
1 answer
How to write on other values placed after the operators case?
Good afternoon, I am using the switch construction, but I don’t know how to write correctly for other values after the case operators.
In the DisplayData code, in the switch construction, I assign a command number to the fields, for example: Vin =…

Вадим Кузьмин
- 121
- 11
2
votes
1 answer
How to avoid field glitch with mouse focus
When I drag the mouse pointer outside the processing window, my program reacts in unexpected ways. How to reproduce:
Hover the mouse pointer over the "MIN" field and try to change the value of the numbers in the field, while holding the left mouse…

Вадим Кузьмин
- 121
- 11
2
votes
1 answer
Change the picture when pressing the button
Tell me how to make it change to the next one when you click on a picture. I use a library "ControlP5, cp5.addbutton" with a regular button in which I could do without a picture.
I have two examples, with a regular button and a picture, where I use…

Вадим Кузьмин
- 121
- 11
2
votes
1 answer
ControlP5 doesn't modify inherited variables of plugTo object
In the following example B class extends A class, it inherits int a variable.
the cp5 slider is plugged to an instance of a B object, and the assign variable is "a".
import controlP5.*;
ControlP5 cp5;
B b;
void setup()
{
…

Denise Audirac Kushida
- 103
- 6
2
votes
1 answer
Using controlp5 widgets from within a class in Processing
I'm building an interface using Processing and controlp5 for an Arduino with some sensors attached to it. I want to have many sensors, so I am trying to build the interface in a modular fashion so that I can just instantiate as many control panels…

David
- 21
- 5
2
votes
1 answer
How to hide a text label after mouse is pressed?
I have used Control-P5 library for drawing the text label
void setup(){
size(1400,800);
cp5 = new ControlP5(this);
myTextlabelB = new Textlabel(cp5,"Hello world",100,100,400,200);
}
void draw(){
myTextlabelB.draw(this);
…

Rakesh Adhikesavan
- 11,966
- 18
- 51
- 76
2
votes
1 answer
Can't import ControlP5 in Processing.js
import controlP5.*;
ControlP5 gui;
void setup()
{
gui = new ControlP5(this);
}
The previous code, when run in Processing.js gave the error: "Uncaught Processing.js: Unable to execute pjs sketch: ReferenceError: ControlP5 is not defined" even…

Gilead Cosman
- 21
- 6
1
vote
1 answer
How to mask text box with image in Processing w/ cp5
Within my code, I wanted to overlay the warning_img over the alert_box I have created, however using the mask function produces an error as the alert_box is not an image and needs to stay as a text box as it will be edited later to produce changing…

snj534
- 21
- 1
1
vote
0 answers
How to rotate the buttons in Processing
I have 24 buttons that will shape a circle together.
So, the image of the buttons should look in a rotating way like this:
I want to use the same 3 images (setImages(); 3 images for 3 mouseClick conditions in 1 button) in each of them. I thought I…

noobie
- 361
- 2
- 9
1
vote
1 answer
Processing - Specifying exact locations for mouseclicks on image-buttons
I have 4 different areas for my LED ring and I uploaded 4 image-buttons to select them. I want to be able to click exactly on the object, but it clicks on the rectangle area. So my question is,
Is there a way to specify exact locations for mouse…

noobie
- 361
- 2
- 9
1
vote
1 answer
How to change color of each controlP5 dropdown list entry individually?
Using the following MWE:
import controlP5.*;
import java.util.*;
ControlP5 cp5;
void setup() {
size(400, 400);
cp5 = new ControlP5(this);
List l = Arrays.asList("a", "b", "c", "d", "e", "f", "g", "h");
/* add a ScrollableList, by default…

Tea Tree
- 882
- 11
- 26