Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increasing a Textfield's width via annotations cuts off the input text #165

Open
jango-fx opened this issue Nov 10, 2020 · 0 comments
Open

Comments

@jango-fx
Copy link

jango-fx commented Nov 10, 2020

When I try to create a Textfield via annotation and change its width to a value larger than the default 100px, any text input will be cut off after 100px

macOS 10.14.6 (18G6032)
Processing 3.5.4
ControlP5 2.2.6

screenshot

import controlP5.*;
ControlP5 cp5;

@ControlElement (properties = { "height=10", "text=12345678901234567890"}, x=10, y=10, label="default width")
  public String txt1 = "";

@ControlElement (properties = { "width=200", "height=10", "text=12345678901234567890"}, x=10, y=50, label="cuts off here ----------'")
  public String txt2 = "";


void setup()
{
  size(300, 200);
  cp5 = new ControlP5(this);
  cp5.addControllersFor(this);

  cp5.addTextfield("does not cut off")
    .setPosition(10, 90)
    .setSize(200, 10)
    .setValue("12345678901234567890")
    ;
}


void draw()
{
  background(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant