Flex :: Setting The RowCount And ColumnCount In A TileList?
Sep 28, 2010
I'm using the TileList in a Flex 3 website. I need to set the rowCount and columnCount to factors of the total number of items in my array. For example, let's say that there are 15 items in my array. Then, I'd like to set the rowCount to 3 and the columnCount to 5 (3x5=15). Or if I had 16 items in the array, then I'd like to set the rowCount to 4 and the columnCount to 4 (4x4=16). The problem is that the length of the array varies. It's pulled from a database.
The tree should have a minimum row count of 4 and a maximum of 10 (beyond which it should display the scroll bars). So, I have a tree with rowCount="4" and I want rowCount to change up to "10" depending on the currently expanded nodes. In debug I can see two of the tree's properties which I could use[code]...
But these are not accessible from outside so I can't find a way to understand if the tree is expanded or not.
I am trying to find a way to Scale (either font or scaleX&Y) a DataGrid (with equestedMinRowCount = requestedMaxRowCount = requestedRowCount = dataProviderLength), so that it would Always show all the Rows (so no scrollers).Solution I came up with for Scaling is:
protected function thisDatagrid_resizeHandler(event:ResizeEvent):void { if (event.oldWidth < this.width) {
has anyone made a Custom Skin for a TileList component in Flash CS5. I want to change the scrollbar of the TileList, i want the track bar as just a thin white line and the thumb a orange circle, this for a Touch Interface.
I'm using flex 4.1 to write an application. i read in the documents that has the rowCount property to set how many items to display. the does not have that property. how can I limit the list to display 3 items ?
In the code below, the presentedAlbumIndex is used to control the selectedIndex of the TileList. Item "five" is initially selected. Whenever the button is pressed the first item in the array is deleted, and the presentedAlbumIndex is decremented.
In theory, the selected index should stay with "five" every time the button is clicked (until "five" is itself deleted). It works this way for the first button press. However, on the 2nd button press the highlighting changes to "six" for some reason. Also, the TileList selectedIndex is always one behind.
I tried looking into ListBase and monitoring selectedIndex. It looks like the selectedIndex is updated initially to the correct index, but then it reverts back at some point to the correct index+1. I do not know why it's setting back.
It seems it's due to the fact that I am doing a data provider delete and index change in the same operation.
Is there some function in TileList I could override to keep selectedIndex up to date?
In my TileList, I want to select the TileList items on rollover, as opposed to the click event. I already have the TileList setup to allowMultipleSelection = "true".
I have 2 TileList component in my Flex application. 1 tilelist is filled with data much like following xml sample: <person name="Test"> <likes>Flex</likes> <likes>PHP</likes> </person> <person name="test2"> [Code] ..... data shown is the preference.
The user can click the first tilelist and then the items that person "likes" should be selected in the second tilelist (in other words they lit up). Click event on my first tilelist private function highlightPreferences(e:ListEvent):void{ trace(e.currentTarget); //and now I'm stuck }
I have an associative array that I want to display using TileList. However, it doesn't understand what is being fed to it. All I got is [object] in the TileList.
[bindable] public var people as array = new array(); private function loadArray():void{
I am navigating the items of tile list using next and previous button. I need to highlight the first item in the tilelist by default ( like the first item is being selected by default)
Is there a way to have the TileList component to auto-size to its contents? I have tried setting it 100%, but it seems that won't help. I don't want to hard-code the height because the content will be vary, and I don't want scrollbars to show up.
I'm working for the first time with a TileList and an itemRenderer and I'm having a bit of trouble getting the information from my array collection to display Here's what I've got
private function loadData():void{ var stmt:SQLStatement = new SQLStatement(); stmt.sqlConnection = sqlConn;[code].....
how I go about pulling the information from the array and putting it into labels like username, userjob, userbio ect, Inside the TitleList and itemRenderer.
the problem is the creationComplete event is not fired for each PageImageRenderer, and it is fired only for the tiles visible at start so the rectangles drawn in initComponents() is only drawn for those tiles with valid values, and when I scroll to next row using scrollToIndex() function the rectangles are shown with previous values. and no initComponents() is called for these tiles? however the data.name, data.class are correctly displayed but not the rectangles, why it is so? What is the proper event against which I should call initComponents()?
I have prepared a simple test case for a PopUpButton opening a TileList with black and red entries and it mostly works, but has 2 annoyances. I've searched a lot, tried several variants (added [Bindable] members in my renderer; added color member to the bids array; created my public override set data() method; ...) and has been getting some answers too, but they are way too general.
1) Scrolling "tl2" right-left doesn't work well: the entries are displayed in a mix of red and black. I know the TileList reuses itemRenderer, but how do I fix the problem?
2) In debug-mode I get numerous warnings: warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)
I want to create a tilelist in which there would be different canvas or vbox etc, and i want to make them drag able.I wrote a code to do this, but the output does not shows anything in a list.
Ive got an editable datagrid, and the size allows 16 rows. It is possible for the user to add/remove a row, which would increse/decrease the myDataGrid.rowCount of the datagrid. However, whenever a row is added/removed, the rowCount remains the same (16, which it was created with). Is there another built-in variable other than rowCount that can gauge the ACTUAL rows in the datagrid, not just what it was created with?
I have a TileList that's loaded with data from Flickr. The tilelist uses an imageRenderer to make a bunch of thumbnails. I'm trying to create a custom drag and drop function, but I want to get the image source of the tilelist mouseEvent target. Here's what the code looks like for the drag handler:
I'm running into an odd issue with itemRenderers inside a TileList.Here is a working example without an itemRenderer: 152.org/flex/
Here is the broken version with an itemRenderer: 152.org/brokenExample/. (I don't have the rep to make both of these a link)Both examples have "View Source" enabled.To see the problem use the broken example, select an album and scroll down one row. Scroll back up and the images will be switched.If you try this on the working example it's fine.This seems to be a widely known bug, but I can't find a solution for it.
UPDATE: I started playing with this example again and found out something else. Turns out you don't have to override the data setter. You can create a new method in the itemRenderer that is set whenever the tile wants to refresh. So the trick is to not rely on the initialize or creationComplete methods.This is what I have for the itemRenderer in the Application.
<itemRenderers:ImageTile img="{data}"/>
This is the code I have in the itemRenderer.
public function set img(value:String) : void { trace("setting source: " + value); this.source = value;[code]....
How to use the horizontal align property of TileList or List in flex? I want to make an align left of my TileList with only 1 column. I know I can use a simple List for that, but this is a requirement.
I have an mx:TileList which is bound to an ArrayCollection.I have some code that displays a "Loading..." message before modifying the ArracyCollection and some code after that hides the loading message.For small data sets, it works fine. However, I noticed with an array size of about 50~ and larger, flex will hide my loading message before the TileList is finished rendering the new data and I'm left with a blank screen for an odd second.Is there an event I can listen to that is called after the TileList is finished re-rendering? Code looks something like this:
loading_message.visible = true; for each (var x:Object in new_data) { tile_list_data.append(x); // bound to my_tile_list component[code]..........
In this example, loading_message appear, disappear, and then the flex app will lag before finally revealing the updated TileList.
I have a Flex TileList with an itemRenderer made by me. The list loads the content perfectly and renders it. Renderer is a simple canvas element with a checkbox and another canvas with some labels with data. I implemented a method that, on TileList itemClick="clickedItemHandler(event)", Changes the state of the checkbox (if checked -> uncheck, and vice versa). The method works if I click on any place of the item, EXCEPT the checkbox. When I click the checkbox, it doesn't change state. Maybe I was changing the state of the checkbox, and the event changing it back, but I debugged it and it doesn't look like so..
I have some images I would like to display in TileList in Flex. My TileList dimensions are 2 columns by n rows. What I want to do is to display the first item (row 1, column 1) empty and not clickable, and to start displaying my items from row 1, column 2.I also wonder when I create click event for the same TileList, is there a way get an index of clicked element?
I am using a TileList control with an effect sequence linked to the itemsChangeEffect property.[code]...
However, my data provider is a ListCollectionView that I use to filter items. When I set a filter criteria, it will hide a couple of items from the TileList but there is no animation like when I remove an item. Is there a way to animate the TileList when an item is filtered ?
I have placed TextFileds inside TileList Compontent. When i try to select the TextField it can't show the selected Textfield in the TileList items by default the TileList items are selected.Finally i need to select the TextFields.
Here is my code:
import fl.controls.TileList; import fl.data.DataProvider; import flash.display.Sprite; import flash.events.Event; function TileListExample() { var dp:DataProvider = new DataProvider(); var totalEntries:uint = 3; var i:uint; for(i=0; i<totalEntries; i++) { dp.addItem( { source:getTf(), scaleContent:false}
I'm in need of some dire help here. I'm writing an application in Flex 3 that utilizes a TileList with a custom itemRenderer to display info from a service. Unfortunately, I'm running into an exception with the drag/drop/rearrange portion of the TileList. With dragEnabled and dragMoveEnabled, I receive a fully-reproducible exception when trying to rearrange the tiles in the control:
Exception: ArgumentError: Error #2004: One of the parameters is invalid. at flash.utils::ByteArray/writeObject() at flash.desktop::Clipboard/putSerialization()[code]....
When I try to debug, the debugger doesn't seem to indicate to me any piece of code that might be faulty.