gordy43 / controlp5

Automatically exported from code.google.com/p/controlp5
0 stars 0 forks source link

Textfield Label Position Shifts when Value Text Overflows #52

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I noticed that a Textfield's label position changes as soon as the value text 
overflows.

Here's the minimal test case:

import controlP5.*;
ControlP5 cp5;

void setup() {
  size(500, 500);

  PFont font = createFont("arial",20);
  cp5 = new ControlP5(this);

  cp5.addTextfield("input")
     .setPosition(20, 20)
     .setFont(font)
     .setText("bla bla bla bla bla bla bla")    
     .getCaptionLabel().setFont(font)
     ;
}

void draw() {
  background(0);
}

(The "input" label should be aligned with the left of the textfield by default.)

Only seems to happen if the caption label's set to a non-bitmap font.

Thanks for all your work on this project.

Original issue reported on code.google.com by erm...@gmail.com on 29 May 2012 at 3:39

GoogleCodeExporter commented 8 years ago
thanks, fixed with 0.7.5

Original comment by soj...@gmail.com on 30 May 2012 at 6:19