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. > > I can't seem to make anything like that happen. Tracking mouse events is > easy. Changing the border of the widget isn't working at all for me. > > What is the expected qooxdoo approach for this kind of thing? > 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. Greg ------------------------------------------------------------------------------ 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
