LoginSignup
1
1

More than 5 years have passed since last update.

Processing > ControlP5 > textfield > テキスト入力機能 / .setAutoClear(false)

Last updated at Posted at 2016-08-05
動作環境
Processing 3.1.1 on Windows 8.1 pro(64bit)
Library: ControlP5 v2.2.6

text field

テキストを入力する機能

qiita.png

.setAutoClear(false)

3つのtext fieldのうち、一番上のものだけ入力後Enterを押すと入力テキストがクリアされる。
他の2つはEnter押下後もテキストは残る。

違いは .setAutoClear(false)を使っているかどうか。

一番上のテキスト

  cp5.addTextfield("input")
     .setPosition(20,100)
     .setSize(200,40)
     .setFont(font)
     .setFocus(true)
     .setColor(color(255,0,0))
     ;

上から2つ目のテキスト

  cp5.addTextfield("textValue")
     .setPosition(20,170)
     .setSize(200,40)
     .setFont(createFont("arial",20))
     .setAutoClear(false)
     ;
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1