Ok, got it! I had to use some hard-coded values, which I'm not fond of doing, but I can live with it :) Here's the function I used:
private function adjustEditorOffset(e:ListEvent):void { var tree:Tree = Tree(e.currentTarget); var treeBottomY:int = tree.y + tree.height; tree.editorYOffset = (treeBottomY - tree.mouseY < 200) ? -155 : 5; } The 200 is the height of my item editor, and the -155 is just from trial and error as to what looked good :) This seems to do the trick just fine. On Dec 6, 2007 2:27 PM, Ken Dunnington <[EMAIL PROTECTED]> wrote: > I'm afraid that didn't do it. I'm going to try intercepting the > itemEditBegin event and check the position of the item clicked and adjust > the editorYOffset property on the Tree... does that sound right? Of course, > I now need to learn how to figure out the item's position :) > > > On Dec 6, 2007 1:03 PM, Alex Harui <[EMAIL PROTECTED]> wrote: > > > variableRowHeight? > > > > > > ------------------------------ > > > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of > > *Ken Dunnington > > *Sent:* Wednesday, December 05, 2007 11:47 AM > > *To:* flexcoders@yahoogroups.com > > *Subject:* [flexcoders] Custom ItemEditor too big for container > > > > > > > > I've built a custom Tree ItemEditor that consists of a VBox with a Form > > in it. It works just fine (besides the CheckBox which is too picky about > > "true" vs. true in the XML data...) except when I try to edit an item near > > the bottom of the container, the editor gets cut off. Because I wanted it to > > only occupy the smallest necessary space, I set the following properties on > > the Tree control: editorHeightOffset="150" editorWidthOffset="-650", and > > there is no width or height set for the ItemEditor. > > > > What's the best way to ensure that my custom editor won't occupy a huge > > amount of space, but will stay on-screen as well? I tried setting > > verticalScrollPolicy to "on" but it doesn't register as an increase in the > > control's height, so the bars don't activate when the editor is off the > > screen. > > > > > > > > > > -- > Suppose you were an idiot. And suppose you were a member of congress. But > I repeat myself. > -- Mark Twain -- Suppose you were an idiot. And suppose you were a member of congress. But I repeat myself. -- Mark Twain