如何使用ControlsFX实现自动完成文本字段

编程入门 行业动态 更新时间:2024-10-17 07:25:11
本文介绍了如何使用ControlsFX实现自动完成文本字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用ControlsFX的最新版本(8.0.5),我想我需要自动完成文本字段一点点的帮助,因为我在这个非常新。

我从这个code 这里

AutoCompletionTextFieldBinding.createBinding(MyTxtField,SuggestionProvider.create(你好,你好世界,苹果,酷,歌诗达,可口可乐,可口可乐));

但它显示一个错误:方法SuggestionProvider不适用

任何意见,来实现这个自动完成,以便有像 ID 和值?解决方案

如果您检查成绩单到您所引述的codebitbucket/controlsfx/controlsfx/pull-request/196/auto-complete-support-see-127/diff (早2月)和controlsfx 8.05的发布日期3月4日 fxexperience/controlsfx/ ,可能的解释是该code很可能不工作,因为你所引用的只是实验性的API,尚未最终确定,然后。最终版本目前在最后8.05工作之一在

TextFields.bindAutoCompletion(            文本域,            嘿,你好,你好世界,苹果,酷,歌诗达,可口可乐,可口可乐);

和其他的API,您可以检查使用自动完成从IDE

我建议检查出controlfx 8.05样品看看源$ C ​​$ C,这将有很大的帮助:}

I'm using the latest version(8.0.5) of ControlsFX and I think I need a little help with the AutoComplete TextField because I'm very new at this.

I got this code from here

AutoCompletionTextFieldBinding.createBinding( MyTxtField, SuggestionProvider.create("Hey", "Hello", "Hello World", "Apple", "Cool", "Costa", "Cola", "Coca Cola") );

But it show a error: method SuggestionProvider is not applicable.

Any advice to implement this autocomplete in order to have an array like a dictionary with ID and VALUE?

解决方案

If you check the transcript to which you have quoted the code bitbucket/controlsfx/controlsfx/pull-request/196/auto-complete-support-see-127/diff (early feb) and the release date of controlsfx 8.05 dated 4 march fxexperience/controlsfx/ , likely explanation is that the code is likely not working because what you have quoted is just experimental API that yet to be finalized then. The final version is the one currently working in the final 8.05 as in

TextFields.bindAutoCompletion( textField, "Hey", "Hello", "Hello World", "Apple", "Cool", "Costa", "Cola", "Coca Cola");

and other API you can check using autocomplete from your IDE

I recommend checking out controlfx 8.05 samples to look at the source code and that will help a lot :}

更多推荐

如何使用ControlsFX实现自动完成文本字段

本文发布于:2023-11-24 22:53:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627204.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字段   如何使用   自动完成   文本   ControlsFX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!