1

我在 spark TextArea 中有问题。当文本滚动到底部时,但滚动拇指不在末尾。

例子:

AS3

[Bindable]
private var txt:String = "Challenge.\nTo make lighting an integral element of this chic and sassy business hotel, creating a sense of freshness during the day and romance in the evening.\nOverview.\nWedfssgs is a four-storey boutique design hotel which aims to differentiate itself from other conventional hotels by being fun and innovative. The hotel aims to create a unique experience for guests — a place that is cosy, personal and home-like. The core design theme is about celebrating being singular — no two of the seventeen rooms are the same.\nProject Requirements. Creation of a fun and innovative place that differentiates itself from other conventional hotels. Creation of a home-like and unique staying experience for hotel guests. Management of lighting and control of tropical sunlight throughout the property. Provision of distinct atmosphere during breakfast, lunch and dinner operations for in-house contemporary restaurant — Lucas. Design for a Memorable Stay.\nRenowned designer William Sawaya of Sawaya & Moroni set the design tone of klapsons as “contemporary luxury”. Welcoming the guests upon arrival at the hotel is a unique stainless steel sphere that functions as the reception and check-in desk. The ceiling, like the sphere, is designed to harmonise and bring life to the entire lobby. Made up of three tiers of free form organic shapes, it invokes illuminating lights that flush the entire lobby in hues from the colour spectrum. Surrounding it is the hotel lobby that is equipped with a modern LED lighting system where the background tones can vary to match different moods at different hours of the day.  \nThe same design flair is also found along the corridors leading to the guestrooms, in which profiles of light indicate the doors.  To obtain the largest possible number of rooms, the space of each room has limited width but extends considerably in depth. Whether it's a choice of the standard rooms or the klapsons suite experience, the guests would expect a thoughtfully configured room with a unique setting. Redefining the notion of the bath, shell-shaped and cylindrical-styled showers, even an open-cube rain shower flanked with full length mirrors and colour changing LED lights have been incorporated for an unparalleled experience.\nAll indirect lights are LED-powered, giving off a sense of freshness during the day and a romantic ambience in the evening with alternation of colours and light intensity.  To achieve this effect without increasing operational and maintenance costs, the hotel has specified Qwreew's QWER™ QWRQTefds Wwetwd System as the main lighting controller.  All changes of light settings at different times provide the option for wqtretqw' staff to manually select the appropriate preset lighting scenes to suit their needs.\nWhen guests at the hotel insert their key cards to enter the rooms, lights inside the guestroom will be automatically turned on to a day-time welcome mode — both the day and night curtains will open automatically and silently;  soft lights will be switched on in the darker parts of the room.  Upon entering the rooms at night, a night-time welcome mode will be turned automatically on. The night curtains will be drawn, the day curtains closed and a warm light activated.";

MXML

<s:TextArea width="400" height="250" borderVisible="false"
    paragraphSpaceAfter="15 paragraphSpaceBefore="15" textAlign="justify"
    editable="false" selectable="true" fontSize="16" text="{txt}"/>

我将文本(通过鼠标滚轮)滚动到底部,但滚动拇指没有到达底部。如果我拖动它,文本将保持在其位置。结果我有一些滚动拇指不敏感的区域

在此处输入图像描述

更新 31.07。我已经为这个问题做了临时的热修复。这不是很好的解决方案,但可以解决此问题。我修改了TextAreaSkin.mxml 它是:

<!--- Defines the scroller that is used to scroll the TextArea control. -->
<s:Scroller id="scroller" left="0" top="0" right="0" bottom="0" 
    minViewportInset="1" measuredSizeIncludesScrollBars="false"
    hasFocusableChildren="false">
    <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
    <s:RichEditableText id="textDisplay" heightInLines="10" widthInChars="15" />
</s:Scroller>

变成

<!--- Defines the scroller that is used to scroll the TextArea control. -->
<s:Scroller id="scroller" left="0" top="0" right="0" bottom="0"
    minViewportInset="1" measuredSizeIncludesScrollBars="false" 
    hasFocusableChildren="false">
    <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
    <s:Group mouseEnabled="false">
        <s:RichEditableText id="textDisplay" width="{scroller.width - 5}"/>
    </s:Group>
</s:Scroller>

Scroller 错误地测量了文本组件的大小。

4

0 回答 0