Ver Mensaje Individual
  #1  
Antiguo 16-03-2012
prietor prietor is offline
Registrado
NULL
 
Registrado: mar 2012
Posts: 2
Reputación: 0
prietor Va por buen camino
Docking y borrado de contenido ActiveX (SftTree)

Hola,

Estoy trasteando con el docking nativo en Delphi 2006 y me he topado con un problema serio: Tengo un TForm dockado inicialmente en un TPanel que contiene un árbol cargado con varios items (control ActiveX SftTree). Al hacer un drag & dock del TForm (bien en otro TPanel, bien como ventana flotante), se disparan automáticamente eventos de borrado de items en el ActiveX quedando el árbol vacío de datos.

El efecto parece producirse con el cambio de Parent del TForm que se está desdockando/dockando. Este comportamiento no ocurre con componentes de la VCL: si pongo una TListBox al ladito cargada con items en el mismo TForm y hago el drag & dock, los items de la lista no se borran!.

Da la sensación de que el cambio de Parent del TForm solo produce un redibujado sobre componentes VCL hijos y, sin embargo, se carga el contenido del resto de componentes no VCL.

No he llegado a encontrar ningún workaround... Alguno os habéis encontrado con esto? Alguna propuesta de solución/workaround?

Os dejo una traza del disparo del borrado de un item del árbol (ActiveX SftTree) al hacer un undock.

TFVentanaSftTree.TForm2.m_arbolItemDeleted($1420700,???)
:00487f3d TOleControl.InvokeEvent + $B1
:00486ba9 TEventDispatch.Invoke + $3D
:4f329dd5 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f361027 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f35f1d5 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f33d8fe ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f38c888 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f3e2999 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f3e0980 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:7722c4e7 ; C:\Windows\system32\USER32.dll
:7722c5e7 ; C:\Windows\system32\USER32.dll
:77221b31 ; C:\Windows\system32\USER32.dll
:77221b57 USER32.CallWindowProcW + 0x1b
:4f35ca47 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f35ca0c ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f35d5a0 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f348010 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f3b5566 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f3635d9 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f3bec80 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:7722c4e7 ; C:\Windows\system32\USER32.dll
:7722c5e7 ; C:\Windows\system32\USER32.dll
:77224f0e USER32.GetScrollBarInfo + 0xfd
:77224f7d ; C:\Windows\system32\USER32.dll
:779e6fee ntdll.KiUserCallbackDispatcher + 0x2e
:4f3baf45 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:4f3b77b0 ; C:\Windows\system32\SftTree_IX86_U_70.ocx
:00487774 TOleControl.DestroyWindowHandle + $38
:00478e1c TCustomForm.DefineProperties
:01463480
:0046872a TWinControl.RemoveControl + $4A
Responder Con Cita