指示用户默认值 - flex
这正是我对此解决方案的想法,我想知道是否可以采取更好的方法?
我正在创建一个简单的桌面联系人应用程序。
用户可以输入人们的联系信息。我添加了一个包含城市名称的组合框。用户可以将城市添加到此列表中,然后在输入新联系人时,他们可以从下拉列表中选择城市。
现在我正在尝试添加默认城市功能,因此如果有人在添加新联系人时不断添加来自同一城市的联系人,则组合框将自动显示默认城市。在设置模式下,用户可以通过数据网格查看所有城市。
我正在努力找出最好的方法来做到这一点。我认为当用户选择一个城市并将其指示为所需的默认城市时,我可以将 default_city 字段添加到数据库中,它将将该信息添加到数据库中。然后我可以运行一个单独的查询来将默认城市输入到组合框的提示中。
我知道我可以通过向 dg 添加另一列来指示默认城市,但我想知道是否有一种方法可以用图标或粗体文本来指示它为默认城市?
谢谢你的建议!
This was just what I was thinking for this solution and I would like to know if there's a better approach I could take?
I'm creating a simple desktop contacts application.
Users have the ability to enter in peoples contact information. I've add a combo box containing city name. The user has the ability to add city to this list and then when entering in a new contact they are able to just select the city form the drop down.
Now I'm trying to add a default city feature so if someone is constantly adding contacts from the same city when they add a new contact the combo box would show the default city automatically. In the settings mode user can view the all cities via a datagrid.
I'm trying to figure out the best way to do this. I was think I could add a default_city field to the database when user selects a city and indicates it as the desired default city it would add the info to the database. Then i could just run a separate query to input the default city into the combo box's prompt.
I know I could indicate the default city by just adding another column to the dg but I was wondering if there's a way to indicate it as being the default with a icon, or bold text instead?
Thanks for the advice!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将需要使用项目渲染器在数据网格中显示自定义信息。这里有一个很好的教程:
http://www.switchonthecode.com/tutorials/弹性使用项目渲染器
You'll want to use item renderers to display custom info in your data grid. There's a good tutorial here:
http://www.switchonthecode.com/tutorials/flex-using-item-renderers