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

There is callbacks or something like bindable properties? #572

Open
MairwunNx opened this issue Jun 13, 2023 · 4 comments
Open

There is callbacks or something like bindable properties? #572

MairwunNx opened this issue Jun 13, 2023 · 4 comments

Comments

@MairwunNx
Copy link

Hello, I creating mvvmlight framework and I want to add support for lanterna to that. But I didn't see this for example, in TextBlock something like onTextChanged which accepts functional interface, and for other components same.

Does your library are providing something like I need?

@MairwunNx
Copy link
Author

@mabe02 if you have support this, please give me response, thanks :)

@avl42
Copy link
Contributor

avl42 commented Jun 16, 2023

Lanterna has a TextBox and this class has a method setTextChangeListener
You pass to it a TextChangeListener instance and this object's onTextChanged method
will then be called whenever the text gets changed. The new text content and a
boolean indicating the source of the change (by program or by user-interaction)
will be passed as arguments to that call.

Does this help?

@MairwunNx
Copy link
Author

@avl42 thanks, yes, but unfortunately it does not exist for other components, anyway thank you, I'll just make a fork and add binding properties :)

@mabe02
Copy link
Owner

mabe02 commented Jul 9, 2023

@MairwunNx could you give example of what it would look like?

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