Skip to content

BigDecimalField changes size on first focus #124

@nils-christian

Description

@nils-christian

Hi,

First of all I want to thank you for providing us with jfxtras. Now about my issue: I have a BigDecimalField in a GridPane (although the bug seems to occur in other panes as well). Initially everything seems to be correct. However, once the field receives the first focus, it suddely changes its size and it looks very wrong. It becomes even worse once I type in the field.

Here is a minimal example for the issue:

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
import javafx.stage.Stage;
import jfxtras.labs.scene.control.BigDecimalField;

public class Bug extends Application {

	public static void main( final String[] args ) {
		Application.launch( args );
	}

	@Override
	public void start( final Stage stage ) throws Exception {
		final GridPane root = new GridPane( );

		final TextField field1 = new TextField( );
		GridPane.setColumnIndex( field1, 0 );
		GridPane.setHgrow( field1, Priority.ALWAYS );
		root.getChildren( ).add( field1 );

		final BigDecimalField field2 = new BigDecimalField( );
		GridPane.setHgrow( field2, Priority.ALWAYS );
		GridPane.setColumnIndex( field2, 1 );
		root.getChildren( ).add( field2 );

		final Scene scene = new Scene( root );
		stage.setScene( scene );
		stage.setMaximized( true );
		stage.show( );
	}

}

Thank you for taking a look at it.

Best regards

Nils

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions