I asked someone here more familiar with the TabBar and Drag and Drop.  Here's what he said:

 

A TabBar is just an HBox, so you can use the getChildAt() function to access the tabs. You can use the tabs 'x' and 'width' properties to determine its size and location. For hiliting, there is no "official" way to do this, but drawFocus(true)/drawFocus(false) should do what is desired. Of course, these methods shouldn't be called in general-purpose code since they will interfere with the focus manager drawing, but they should be OK to call within a drag and drop operation.

 

I'm surprised that getStyle('tabWidth') is returning undefined for explicitly-set tabWidths. This should work.

 

Matt

 

-----Original Message-----
From: Ryan Olson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 01, 2004 11:01 AM
To: [email protected]
Subject: [flexcoders] Using TabBar as a drop target

 

Hi flexcoders,

I'm trying to use a TabBar as a drop target for dnd operations.
Basically I need to drag list items to individual destination tabs on
the TabBar. However, I'm not finding API hooks through which I can
identify and manipulate individual tabs in the TabBar. For example, in
the TabBar's dragEnter handler I need to determine which tab is
currently being hovered over and somehow highlight that tab. I tried
using the tabWidth style to determine this in a calculation using the
mouse coordinates, but it looks like getStyle("tabWidth") is undefined
(I guess that's a style that you can set but not get). Any suggestions
for how to approach this? Thanks

- rdo



Reply via email to