Open NiranjanShah opened 6 years ago
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
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 notifications@github.com 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 https://github.com/edvin/tornadofx-controls/issues/10#issuecomment-362918284, or mute the thread https://github.com/notifications/unsubscribe-auth/AI4lwg4tT3DP-Fuy05Xjakkq6dUIidErks5tRdYfgaJpZM4R4meS.
You are listening for an AutoCompletionBinding
from ControlsFX. It has no effect on the bindAutoCompletion
function in TornadoFX-Controls :)
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 notifications@github.com 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 https://github.com/edvin/tornadofx-controls/issues/10#issuecomment-362921165, 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