Flex/Air:带行号过滤的文本区域
我需要一个带有行号的文本区域, &将文本文件导入到文本区域后.. 用户必须能够选择行号和行号。查看过滤后的输出。
我已经用数字步进器实现了相同的效果。 我正在寻找增强型组件。
有更好的 Textarea 高级组件吗? 任何具有内置搜索/替换/过滤功能的高级文本区域组件?
干杯, 阿杰
I need to have a Text Area With Line Numbers,
& once the Text File is Imported to the Text Area..
the user must be able to select the line numbers & see the filtered output.
I have implemented the same with Numeric steppers.
I am in search of an enhanced component.
are there better Advanced Components for Textarea ?
Any Advanced Textarea component with built-in Search/Replace/Filter Capabilities ?
Cheers,
Ajay
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你认为什么是一条线?选择行时是否需要考虑文本区域的换行,或者您只对底层字符串中的实际行字符感兴趣?
如果后者适用,您可能可以像这样完成您想要的事情:
如果您实际上对视图中的线条感兴趣,考虑到文本区域的宽度,那么它会更复杂。在这种情况下,TextLineMetrics 类可能会派上用场。您可以从 IUITextField 获取引用,它是 TextArea 的受保护属性。也就是说,您需要子类化 TextArea 才能访问此信息。
http://livedocs.adobe.com/flex/3/ langref/flash/text/TextLineMetrics.html
http ://livedocs.adobe.com/flex/3/langref/mx/core/IUITextField.html
What do you consider to be a line? Do you need to take the line wrapping of the text area into consideration when you are selecting the lines, or are you only interested in the actual line characters in the underlying string?
If the latter applies, the you can probably accomplish what you want like this:
If you are actually interested in the lines in the view, taking the width of the text area into account, then it will be more complicated. In this case, the TextLineMetrics class will probably come in handy. You can obtain a reference from the IUITextField which is a protected property of the TextArea. I.e. you need to subclass TextArea to get access to this information.
http://livedocs.adobe.com/flex/3/langref/flash/text/TextLineMetrics.html
http://livedocs.adobe.com/flex/3/langref/mx/core/IUITextField.html