哪些小部件可用于信使
我目前正在学习使用 GUI 进行 Ruby 编程。并且选择了wxruby。但以前从未使用过wxwidgets。所以我的问题是,我应该为用户列表、消息列表(滚动)和输入区域使用哪些小部件?
希望能够在输入区域和消息列表中选择字体、颜色和使用图标等。并希望能够在用户列表中包含用户图像、昵称、状态和表情。
那么有人知道该使用哪个吗?
I'm currently learning to program Ruby with GUI. And has chosen wxruby. But has never used wxwidgets before. So my question is, which widgets do I use for the users list, the message list (scrolling) and the input area ?
Want to be able to choose font, color and use icons etc in the input area and the message list. And hoping to be able to have the userimage, nickname, status and smileys in the userlist also.
So anyone knows which to use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于输入区域和消息显示,您可能需要使用 wxRichTextCtrl,它可以让你设置字体、颜色、样式等。两者之间的主要区别是消息显示应该是只读的。要更改输入区域的样式,您可能需要将 wxButtons 绑定到函数来修改样式。
用户列表可能最好作为 wxTreeCtrl,因为你可能会希望能够拥有可以扩展的群组。另一方面,使用 wxSimpleHtmlListBox 可能要简单得多,因为您将能够使用 HTML 来描述您想要显示的内容,而不必担心另一个控件的更详细的细节。
为了便于将来参考,您可能需要查看按类别划分的类页面当您了解自己需要什么时,可以帮助您确定需要哪些控件。
For the input area and the message display, you'll probably want to use a wxRichTextCtrl, which will let you set fonts, colors, styles, etc. The main difference between the two is that the message display should be read-only. To change the style on the input area, you'll probably have wxButtons bound to functions to modify the style.
The userlist will probably be best off as a wxTreeCtrl, because you'll probably want to be able to have groups that you can expand. On the other hand, it might be a lot simpler to use a wxSimpleHtmlListBox because you will be able to use HTML to describe what you want to show, rather than having to worry about the finer details of another control.
For future reference, you might want to look at the Classes by Category page to help you figure out which controls you need, when you have an idea of what you're looking for.