tag:blogger.com,1999:blog-4686657150124826716.post7335753358368321715..comments2023-10-16T04:02:52.545-07:00Comments on Flex and ActionScript Development Tips: Highlight The ScrollBar TrackChris Callendarhttp://www.blogger.com/profile/14461038089756851470noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-4686657150124826716.post-87085436125971810132010-11-08T15:57:31.800-08:002010-11-08T15:57:31.800-08:00To color the highlight there are two styles that I...To color the highlight there are two styles that I mention above: <b>highlight-color</b> and <b>highlight-alpha</b>. To change the color of the track you'll have to look at the Styles available for the Flex VScrollBar. In Flex 4/spark you probably have to skin the ScrollBar in order to change the track colours.<br /><br />As for the previous/next functionality, you might try working with the BlockTextArea class. I'd suggest having a <b>currentIndex</b> property that keeps track of which occurrence you're on.<br /><br />Here's a really quick version of what might work, you can work out the finer details yourself:<br /><br />public function set currentIndex(index:int):void {<br /> var lines:Array = blockLines;<br /> if ((index >= 0) && (index != _currentIndex) && (index < lines.length)) {<br /> this._currentIndex = index;<br /> var line:Number = lines[index];<br /> var max:Number = textField.numLines;<br /> var pos:Number = Math.ceil((line * maxVerticalScrollPosition) / max);<br /> verticalScrollPosition = pos;<br /> }<br />}Chris Callendarhttps://www.blogger.com/profile/14461038089756851470noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-64652168193109024612010-11-08T13:33:21.400-08:002010-11-08T13:33:21.400-08:00Also, can we have different color for track and di...Also, can we have different color for track and different color highlight?Gaini Rajeshwarhttps://www.blogger.com/profile/04003021635273919265noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-1046222419003119402010-11-08T13:21:16.673-08:002010-11-08T13:21:16.673-08:00Yes, it is working fine.
I have one more question...Yes, it is working fine.<br /><br />I have one more question. Can we have previous/next kind of facility in this?.<br /><br />When i click on 'next' it should move to the next occurance of that word in next area and same rule for previous.<br /><br />Any suggestion on how to do that?Gaini Rajeshwarhttps://www.blogger.com/profile/04003021635273919265noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-83103413160446743082010-11-05T16:07:33.785-07:002010-11-05T16:07:33.785-07:00Yes it works fine whenever I've used html insi...Yes it works fine whenever I've used html inside TextAreas.Chris Callendarhttps://www.blogger.com/profile/14461038089756851470noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-36729596343537802242010-11-05T15:44:03.798-07:002010-11-05T15:44:03.798-07:00Hi,
I am trying to use your component. My text a...Hi, <br /><br />I am trying to use your component. My text area holds htmlText instead of text. will this work with htmlText property of textarea?Gaini Rajeshwarhttps://www.blogger.com/profile/04003021635273919265noreply@blogger.com