G4P Gtextbox border issue


When i use a dark background and custom colorscheme on a GTextfield the bottom line of the textfield disappears. This behaviour is not with scrollbars.

Below is a demo, any suggestions?

// ---------------------------------------------------

import g4p_controls.*;

GTextField textfield1;
GTextField textfield2;

public void setup(){
size(480, 320, JAVA2D);
surface.setTitle(“Sketch Window”);

textfield1 = new GTextField(this, 168, 145, 120, 30/, G4P.SCROLLBARS_HORIZONTAL_ONLY/);
textfield1.setLocalColor(6, color(#ffffff));
textfield1.setLocalColor(7, color(#000000));

textfield2 = new GTextField(this, 168, 185, 120, 30, G4P.SCROLLBARS_HORIZONTAL_ONLY);
textfield2.setLocalColor(6, color(#ffffff));
textfield2.setLocalColor(7, color(#000000));

public void draw(){

All G4P controls that have a UI (user interface) use an off-screen buffer to render the interface and then the buffer is copied to the specified area in the display. This is CPU efficient because the buffer is only updated if its state has changed since the previous frame.

So if we look at the statement
textfield1 = new GTextField(this, 168, 145, 120, 30);
The off-screen buffer is 120x30 pixels and the buffer is copied to location [168, 145] every frame.

Now some controls don’t use the entire buffer for its UI and any unused area is the background and its colour can be changed with something like
textfield1.setLocalColor(6, color(#ffffff));

By default the background is always transparent, to make it visible we use

The reason you don’t see the bottom line is because the typing area goes down to the bottom of the buffer - hence the background is not visible at the bottom.

NOTE: the GTextField control has no border so the missing line is not because part of a border is missing.

I though it would be something like that.
Thanks for the info.