复杂的项目渲染器(列表中的列表),在第二个列表中与滚动行为作斗争

发布于 2025-01-02 20:02:32 字数 621 浏览 5 评论 0原文

我现在正在为滚动问题苦苦挣扎一段时间。 我正在开发一个带有一些复杂视图的弹性应用程序。其中一个视图就像 Word 文档视图。它从数据库中提取数据并代表需求规范。您还可以在此“单词”视图中编辑数据。它基本上应该像微软Word一样工作。该视图工作正常,但我有一个问题:滚动!

为了实现该视图,我创建了一个复杂的 ItemRendererClass,其中包含另一个复杂的 ItemRenderClass。想象一下吧>

-章节列表(itemrenderer) - 章节编号 + 章节标题 - 章节文本 - 章节图片 - 数据列表(itemrenderer) - 需求数量 - 要求文本 - 图片 - 很多很多的属性 -...

总而言之,我真的很高兴“单词”视图和编辑器的工作方式,但如果我向下滚动并且我在代表需求列表的第二个列表上,我将无法再滚动,当鼠标超出列表项我可以再次滚动。我所做的是出于性能原因在两个列表上使用虚拟布局,并且第二个列表高度为 100%,因此第二个滚动条永远不会出现。我尝试使用“this.scroller.setStyle('verticalScrollPolicy', 'off')”禁用第二个列表的第二个滚动条。但什么也没发生。我想要的是一种正常的滚动行为,这意味着鼠标在“wordview”中的位置并不重要,我想像滚动一个列表而不是两个列表一样滚动。

I'm struggling for a while with a scrolling problem now.
I'm developing a flex application with some complex views. On of the views is like a word document view. It pulls data from the database and represents requirement specification. You can also edit the data within this "word" view. It should basically work like microsoft word. That view works fine but I have one issue with it: Scrolling!

To realize that view I have created a complex ItemRendererClass that contains another complex ItemRenderClass. Imagine it like that>

-List of chapters (itemrenderer)
- Chapternumber + ChapterTitle
- ChapterText
- Chapterpicture
- List of data (itemrenderer)
- Requirementnumber
- RequirmeentText
- Pictures
- lots and lots of attributes
-...

All in all I'm really happy how the "word" view&editor works but if I'm scrolling down and I'm over the second lists which represents the list of requirements I can't scroll anymore, when the mouse is out of the list item I can scroll again. What I have done is I use virtual layout on both lists for performance reasons and the second lists height is a 100%, so the second scroller never appears. I have tried to disable the second scroller of the second lists with "this.scroller.setStyle('verticalScrollPolicy', 'off')". But nothing happens. What i want is a normal scrolling behaviour, means that it shouldn't matter where in the "wordview" the mouse is I want to scroll like it is one list and not 2 lists.

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

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

发布评论

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

评论(1

树深时见影 2025-01-09 20:02:32

好的,解决了。实际上真的很容易。我刚刚为第二个列表创建了一个皮肤,其中删除了滚动条组件。除此之外,我还必须将滚动条从第二个列表签名到父列表。到目前为止效果很好

Ok, solved it. Was really easy actually. I just created a skin for the second list where i deleted the scroller component. In addition to that i had to sign the scroller from the second list to the parent List. Works like a charm so far

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