如何在 Flex 中创建这种类型的组合框?

发布于 2024-08-01 23:48:34 字数 314 浏览 1 评论 0原文

有没有人创建过如下组合框(取自 Bombay Sapphire 网站)?

这对我来说很酷,有人知道该怎么做吗?

组合框 http://img194.imageshack.us/img194/ 3079/comboboxx.jpg

Has anyone ever created a combobox like the one below taken from the Bombay Sapphire website?

It's cool to me, does anyone know how to do this?

Combo Box http://img194.imageshack.us/img194/3079/comboboxx.jpg

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

无悔心 2024-08-08 23:48:34

我创建了一个非常基本的 Flex 示例,其中包含一些这种行为。 您可以在此处查看演示:
http://www.jamesward.com/demos/SapphireComboBox/SapphireComboBox.html

代码在这里:
http://www.jamesward.com/demos/SapphireComboBox/srcview/index.html html

I've created a very basic Flex example that has some of this behavior. You can see the demo here:
http://www.jamesward.com/demos/SapphireComboBox/SapphireComboBox.html

The code is here:
http://www.jamesward.com/demos/SapphireComboBox/srcview/index.html

何处潇湘 2024-08-08 23:48:34

看起来不错,但我不认为有什么特别的。 我什至不确定它是一个组合框 - 例如,选择年份“2008”,然后再次将鼠标悬停在年份“组合”上。 它以 1987 年为中心,尽管它应该显示 2008 年左右的年份。它当然不需要是一个 ComboBox,只是为了看起来像一个 ComboBox。

设置起来很容易 - 一个看起来像组合的控件,带有用于弹出列表的鼠标输入/鼠标输出的事件处理程序。 这可能是一个带有鼠标移动处理程序的实际列表,该处理程序处理列表垂直限制附近鼠标移动时的滚动。 使用合适的模糊滤镜和不透明度设置很容易生成“光环”效果。

给出详细步骤太啰嗦了,但是从技术上来说并不难做到。

更新:抱歉,我没有等效的现成示例可供您参考。

It looks nice, but I don't think it's anything special. I'm not even sure it's a ComboBox - for example, select "2008" for the year and then hover over the year "combo" again. It centres on 1987 even though it should be showing years around 2008. It certainly doesn't need to be a ComboBox, just to look like one.

It's easy enough to set up - a control which looks like a combo, with an event handler for mouse in/mouse out which pops up the list. This could be an actual list with mousemove handlers which handle the scrolling on mouse movement near the vertical limits of the list. The "halo" effect is easy enough to generate with suitable blur filters and opacity settings.

It's too long-winded to give the detailed steps, but technically it's not hard to do.

Update: Sorry, I don't have an equivalent ready-to-show example to point you to.

不语却知心 2024-08-08 23:48:34

我相当确定 Silverlight 3 中也有实现此目的的技术。 但我并不是说这很容易。 数字在矩形内滚动的方式......

如果你真的想制作这样的东西,你需要理解
- silverlight 中的可视化状态管理器
- silverlight 中的故事板
- 也许 silverlight 3 中的像素着色器可以在鼠标悬停时在矩形周围产生光环
-画布和剪辑来滚动日期/月/日?

有兴趣看看别人的想法。

I am fairly certain the technology to do this is in Silverlight 3 as well. I am not saying it would be easy however. The way the numbers scroll inside the rectangle for one...

If you are serious about making something like this you would need to understand
-visual state managers in silverlight
-storyboards in silverlight
-maybe pixel shaders in silverlight 3 to do that halo around the rectangle on mouseover
-canvas and clipping to do the rolling dates/months/days?

Interested to see what others think.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文