-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Help|Guide] AutocompletionEvent.AutoCompleted #10
Comments
What type is tfParent? Please supply a complete, runnable code example that showcases the issue. |
tfParent is TextField
import javafx.collections.ObservableList
import javafx.scene.control.TextField
import org.controlsfx.control.textfield.AutoCompletionBinding
import tornadofx.*
import tornadofx.controlsfx.bindAutoCompletion
class AutoCompleteTestApp : App(AutoCompleteTest::class)
class AutoCompleteTest : View("AutoComplete comboBox extension test")
{
var listGroupName = listOf<String>("Apple","Mango","Cherry","Strawberry")
private lateinit var tfParent : TextField
override val root = form {
fieldset {
field("Parent Name") {
textfield()
{
tfParent = this
bindAutoCompletion(listGroupName).apply {
addEventHandler(AutoCompletionBinding.AutoCompletionEvent.AUTO_COMPLETED)
{
println("Coming here")
}
addEventFilter(AutoCompletionBinding.AutoCompletionEvent.AUTO_COMPLETED)
{
println("Coming here")
}
}
//setOnAction { println("On ACtion") }
}
}
}
}
}
Regards
Niranjan G Shah
… On 04-Feb-2018, at 9:39 PM, Edvin Syse ***@***.***> wrote:
What type is tfParent? Please supply a complete, runnable code example that showcases the issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#10 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AI4lwg4tT3DP-Fuy05Xjakkq6dUIidErks5tRdYfgaJpZM4R4meS>.
|
You are listening for an |
Can you please guide to how to listen for the event of Controlsfx in
tornandofx.
On Sun, 4 Feb 2018 at 10:19 PM, Edvin Syse ***@***.***> wrote:
You are listening for an AutoCompletionBinding from ControlsFX. It has no
effect on the bindAutoCompletion function in TornadoFX-Controls :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI4lwl3Or-3dYHZm3SnyEe_z9bVRT90Mks5tRd-pgaJpZM4R4meS>
.
--
Regards Niranjan G Shah
|
That would be described in the ControlsFX project, there is no difference between TornadoFX and JavaFX in that respect. If you want to listen to this event, use the corresponding component from ControlsFX instead. |
AutoCompleted event is not fired
tfParent.addEventHandler(AutoCompletionEvent.AUTO_COMPLETED)
{
println("Coming here")
}
I believe this is the right way to trap the event, if it is correct then the AutoCompleted event of textfield is not getting fired.
Kindly guide in case the way its done is wrong
The text was updated successfully, but these errors were encountered: