wiln / flexlib

Automatically exported from code.google.com/p/flexlib
0 stars 0 forks source link

TreeGrid not adding horizontal scroll bar when necessary #201

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Implement a tree grid and turn the horizontalScrollPolicy to either "on"
or "auto".
2. Feed it a dataprovider containing a node with a long string for the
dataField, long enough so that it stretches off of the width of your
treeGridColumn.
3. Notice that the string will go off of the side of the TreeGrid but the
horizontal scroll bar will not become enabled.  

What is the expected output? What do you see instead?

An enabled horizontal scroll bar that will allow the user to scroll over to
the side and view all of the nodes and/or itemrenderers that are going off
of the screen to be viewed by the user

What version of the product are you using? On what operating system?

Flex Builder 3
Flexlib 2.4 (with a slightly modified and improved treeGrid component)
Flex SDK 3.0.0
Flash Player 10
Mac OS X 10.5.6
Mozilla Firefox 3.1 Beta 2

(although this problem seems to be persistant on all browsers and operating
systems as my co-workers have run it on both Mac, Windows, and Ubuntu
Linux, with various browsers so I think this is an issue with the component).

Please provide any additional information below.

What I suspect is happening is that the TreeGridColumn width is getting set
to the width of the TreeGridColumn because I read somewhere that
dataGridColumns are often times crunched down to size in order to make all
of them that need to be shown fit into a datagrid.  I think that the column
width is invariably stuck at the width of the TreeGrid's overall width and
so the program doesn't realize that it needs to enact a horizontal scroll
bar in order to view all of the item renderers/rows in the data grid.  I'm
not 100% certain that this is the cause, this is just a theory of mine. 
Perhaps it just isn't quite sure how to handle the TreeGridItemRenderer
widths as they are indented at random intervals depending on what their
depth is on the tree.

At any rate I've been raking my brain as to how to force a working
horizontal scroll bar into the column.  As you can see from the screen
shots flex seems to know when to put a vertical scroll bar in without
problems but for some reason that is beyond me the horizontal scroll bar
doesn't want to work.  I have tried setting the column width to be bigger
than the datagrid width in the hopes that it would get a scroll bar added
to it but I think flex automatically resized the column back down to fit
within the constraints of the datagrid's overall width.  Does anyone have
any better Ideas?

Original issue reported on code.google.com by bdub...@gmail.com on 19 Feb 2009 at 5:09

Attachments:

GoogleCodeExporter commented 8 years ago
So I found this article:
http://flexsamples.blogspot.com/2008/03/autoscrolling-for-flex-tree.html

The article doesn't exactly relate to this treeGrid component but I'm going to 
try
and see if it can be useful for a solution for this problem...

Original comment by bdub...@gmail.com on 20 Feb 2009 at 3:49