Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Vincent Millet on Oct 15, 2008 06:31
open dhtmlx forum
accordion ondock and onundock events

Hi,

I use the commercial version 2.0.

how can I set new events like onDock and OnUndock?

In my accordion I attach a toolbar with a button to undock the cell.
I need to disable this button when the cell is undocked and to enable it when the window is docked.

It seems the icons path of the accordion is not sent to the window object created: I still get an icon with "codebase" in path (not used in my code).

Thanks a lot for these new components!

Vincent
Answer posted by Support on Oct 15, 2008 06:48
>> how can I set new events like onDock and OnUndock?
You can catch onDock and onUnDock events without adding an event listener, because you new when dock/undock methods should call.

>> It seems the icons path of the accordion is not sent to the window object created: I still get an icon with "codebase" in path (not used in my code).
right,
fix in the code the following path to corresponding:
<dhtmlxaccordion.js>
this._initWindows = function() {
   ...
   this.dhxWins.setImagePath("../../../dhtmlxWindows/codebase/imgs/");
Answer posted by Vincent Millet on Oct 15, 2008 07:06
I agree for the onDock action but not for the OnUndock because the button is added in the title of the window.

So I do that to remove the default button:

accordionB.cells('a').win.removeUserButton('dock');

And I use a 2 states button in my toolbar to control the undock action.

Thank you.

Vincent
Answer posted by Support on Oct 15, 2008 07:16
Just add user-defined event handler "onClick" to a window's button.