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

BigDecimalField changes size on first focus #124

Open
nils-christian opened this issue Jul 9, 2018 · 0 comments
Open

BigDecimalField changes size on first focus #124

nils-christian opened this issue Jul 9, 2018 · 0 comments

Comments

@nils-christian
Copy link

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

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