On Oct 18, 2010, at 10:32 PM, Greg Beaver wrote:

> Ken Arnold wrote:
>> I'm trying to write a widget that changes its border if the user tracks over 
>> it dragging something. The highlight is to show which of the several widgets 
>> on the page would be the recipient of the drop if the user let go. In 
>> addition, If the user's cursor is close to the edge, I want a different 
>> border that highlights that edge, since a drop would put the new thing down 
>> next to the widget on that side.
>> 
> 
> Hi Ken,
> 
> The easiest way is to add a state, such as the hovered state of a
> button.  Check out the source for qx.ui.form.Button's mouseOver listener
> and more importantly, the source for the button appearance, one of which
> is in qx.theme.modern.Appearance.  You'll see the style method can
> change the display based on the state of the button.  The appearance of
> a button (which is logically "button") is automatically changed to
> "button-hovered" when the "hovered" state is added to the button.

Thanks, that was very helpful for selection and the case where the drag is not 
near an edge. When it's near an edge, I only want that edge's border shown in 
the special highlight. This approach would have me create eight new decorators: 
normal with drag border at left, selected with drag border at left, normal with 
drag border at top, …  It would also seem to want five "hovered" states instead 
of just one ("hovered", "hoveredLeft", "hoveredTop", …) Is that really the best 
approach? The widget properties seem not to be available in the style function.

                Ken

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to