Floating toolbar/component dragging problem

I’ve create a component in jucer, a simple toolbat with 3 imageButtons and one static image, gave it static size.

now i have a component inside a tabbedComponent (the tab component is a window in a multidocument component), that adds this juce-created component and set’s it alwaysOnTob, within the toolbar i made the ComponentDragger accoring to the juce API manual, just one problem, when i do:

void CtrlrEditorFloatToolbar::mouseDown (const MouseEvent& e)
{
	myDragger.dragComponent (this, e);
}

the component disappears, and re-appears wheen resize() is called or when i change to some other tab and back. it just fades away, dunno why, its pure JUCER created no other calls of my own.


Should be in  mouseDrag to do the drag.

and

[code]myDragger.startDraggingComponent(this,0);[/code]

Should be placed in mouseDown so that the dragger can get the Component' original location first.

Hope that fixes it.

Should be in mouseDrag to do the drag.

and

Should be placed in mouseDown so that the dragger can get the Component’ original location first.

Hope that fixes it.

i have both:

void CtrlrEditorFloatToolbar::mouseDrag (const MouseEvent& e)
{
	myDragger.startDraggingComponent (this, 0);
}

void CtrlrEditorFloatToolbar::mouseDown (const MouseEvent& e)
{
	myDragger.dragComponent (this, e);
}

myDragger is defined as a private member ComponentDragger myDragger;

hmm… try 'em the other way round…

OMG i’m sorry i missed that :slight_smile:
ofcourse.