Scroll a number of lines in a Spark textarea - actionscript-3

I am writing a database program that allows searches for imported books. On the left hand side of my screen is a Spark TextArea and on the right is a List that shows the results of the search.
When I click on the List, I load the chapter into the TextArea. Here is my problem that I simply cannot figure out. I want the top sentence in the TextArea to be the sentence that was clicked in the List.
I know how many sentences are in my TextArea because I control the "\n". How do I get line xx at the top of TextArea?
For instance, the user searches for "truth" and finds 20 entries for this book. He clicks on a choice in List. That chapter is loaded into the TextArea. This particular chapter has 400 lines. The line I want at the top is line 230. The user can immediately see the context for what follows his choice. He may scroll up to see what precedes.
I've searched and tried a host of ideas but with no success.
Can anyone help with this?
Thanks!

Use TextArea#scrollToRange(). You just pass in the index of the first character of the result and it will scroll to the position you want. I've used it in the past and I remember it working, though it can take some work to get it working exactly as you want.

Related

What is the symbol ######## in a .csv file?

I am looking at the data from this github page and I noticed some weird behavior:
Some of the data cells are filled with ########, but when I click on them I can see a date at the top, as outlined in red. These symbols do not seem to appear in the raw data; yet when I save it on my computer the issue appears (I've tried saving it multiple times and the issue still appears)
This is the raw data:
Jailer Alfred Henry is the one that I have selected in the first picture.
The way I save it onto my computer is by going to the raw data page, right click, and then clicking "Save as..."
Can somebody please shed some light on why this is happening, and if there is a way to fix it?
If possible, I would very much like to keep it as a .csv file.
When the column width is not enough to show a number/date it is displayed as ######## . Just increase the width of column
Its because of the content size is larger than the column width. Please go through this Change the column width and row height in order to arrange the data properly into each row and column.

Select item in dropdown list by taking the text from user

By taking user-input, search for the text in the dropdown. If exists, select it. Else, print: "the text is not present in dropdown".
In Sikuli, you have 2 ways to recognize textual data:
By taking a screenshot of the whole text and creating a pattern.
Use built in OCR features to find the text directly.
It is known however that OCR functionality is very limited and not reliable at the moment, hence the preferred solution is to take screenshot of every option you have in your dropdown menu. Then you can just click on the dropdown menu to display the options and then look for your pattern. If the item will be there, you will get a match if not, you know that it doesn't exist.
Assuming you have already saved you text as a pattern in a file, the code will be fairly simple:
find("dropDownMenu.png).click()
if exists("menuItem.png"):
click("menuItem.png") #not very efficient! Left for code simplicity.
else:
print "the text is not present in dropdown"

Scroll Multiple Text Fields using Action Script 3.0

I am trying to build a Flash application which would display data from a external source and scroll it from left to right.
I am new to action script world, i have found an example in which text is scrolling but here there is only one text field. I would like to have multiple text field depending upon my data loaded from external source. How can i achieve it. Do i need to create 10 text fields if my external data returns 10 records.
Any advice on this would be appreciated. Thanks
It depends on your task, if you need 10 lines of text information that moves independently, so you will need 10 text fields. Or you could scroll one text field and change it's content with a new information (next record). For scrolling of the text field you will need Timer or Enter frame handler or Tweening engine, as for changing text you will need some logic, like if text goes offscreen - show another text data.
For me, your question looks very similar to this one, check it, maybe it will be helpful for you.

Adding list items to a page tactically

I have about 2000 items that I want to add my page. They are right now in alphabetical order in a word doc, and I want to add them in a list sort of manner. Since there are so many of them, and I basically right now am adding each of them one by one I needed to know if there is a quicker way I am missing? Please let me know if so.
Ok I've got some real trick out here go to TinyMCE, Copy Paste the list of words, select all and make it as a list and press submit now copy paste all the items from "Source output from post"
Open your dreamweaver and the page you are working on.
Paste the texts
Select All
Go Properties Panel Find the list button then click it. It should convert all the texts to list items

Re-naming chart legend in Access 2007

In an auto-generated chart based on a query (I dragged the chart object onto a blank form to start it), the chart itself is displaying and updating properly, datawise, but I want to change the Legend from reading "SumOfAvgOfield1" and "SumOfAvgOfield2" to regular words suitable for final presentations. But I can't find a way to change it!
I realize this is a late answer, but I was just having a similar issue and figured someone else might benefit from knowing how to get rid of the 'SumOf' labels.
In design view, right click on the chart and select 'Properties'.
Choose the Data tab.
The 'Row Source' field is the one you're going to be interested.
In there you can see various places where it's labeling your data:
Sum() AS [SumOfData]
Just edit the text right in the properties window and you'll be set.
This is WAY late, but here's what I found (Yes we still use office 2007)
Open the form in PivotTable View. Open Property Sheet. Highlight the column you want to change the Legend Caption for. Choose the Captions Tab in the properties window. There you can change the captions for each column.
Had 4 charts on a form. 3 would let me edit the Heading of the Chart, the 4th would not. Read a lot of posts that did not pertain. Noticed the datasheet for the 4th chart was completely empty.
SOLUTION: Clicked on chart until the datasheet appeared. Added mock field headings and mock data to datasheet. I could then click on chart and edit the chart's Heading. You can also highlight and change the color of selected words in the chart's Heading. Very Nice!
Good luck,
Vancer
The SumofAverageOfFiled1, etc is automatically generated. Even if you edit it in the datasheet, it changes back (or at least that is my experience). What I did to get around this is add a Rectangle and fill it with white and size it to cover up the "Sumof" captions. You can Bring to Front the Rectangle. Then you can add text boxes to label the chart's bars to read the way you want them. Drag them over the Rectange and Bring to Front.
Hope this helps.
Everywhere I looked it said just change the Pivot Table to change the Legend Entry.
Well, let me tell you.
First, if you have no Pivot Table that you can see do the following:
go to design view and select the form
right click and hit Properties. Scroll through till you see AllowPivotTableView and select yes.
Now you can go and change the column headers!
This could help
Select xxxxx, yyyyy from zzzz
Chart0.ChartSeriesCollection(0).DisplayName = ![XXXXX]
Chart0.ChartSeriesCollection(1).DisplayName = ![YYYYY]
Was very difficult to me to find a way to do it.