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

Input Width #36

Open
TheRealTR opened this issue Feb 7, 2022 · 2 comments
Open

Input Width #36

TheRealTR opened this issue Feb 7, 2022 · 2 comments

Comments

@TheRealTR
Copy link

Is it possible to change the width after an input has been created? I've tried several approaches but not sure if it's possible.

@SKaralius
Copy link

Hey, it's possible, I do it like this:

import TextInput from "pixi-text-input";

const textField = new TextInput();
textField.htmlInput.style.width = "50px";

Another way to change the width could be like this:
textField.width = 50
But it looks like that skews the input text depending on the original and new width.

@Mwni
Copy link
Owner

Mwni commented Mar 17, 2022

Oh wow, how could I have missed such a fundamental feature...

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

3 participants