Página 1 de 1

OnEndDrag Event

Publicado: Vie Dic 02, 2005 8:39 pm
por awr
When does the OnEndDrag event fire? I am trying to implement a browse where
the user can drag records from a table to a inconical representation on a
TScrollBox control. The OnBeginDrag event fires properly, but I cannot get
the OnEndDrag event to fire.
I have also noticed that there is no EndDragItem event for browses. Do you
plan on implementing one? Specifically the TDBBrowse component is what I am
referring to.
Thanks,
Andy

OnEndDrag Event

Publicado: Vie Dic 02, 2005 9:17 pm
por Guest
Andrew,
Please consult the Drag & Dro sample carefuly. The OnEndDrag event is fired
on the TScrollbox control.
OnBeginDragITEM and OnEndDragITEM are only for TreeView controls. They have
their own Drag&Drop system to allow changing any item position via Drag &
Drop. You do not need Drag & Drop between TDBBrowse items to do what you
need. Simply Drag & Drop is enough.
Regards,
"Andrew W. Ross" <awr@jps.net> escribió en el mensaje
news:[email=4390a2f3@ozsrvnegro.ozlan.local...]4390a2f3@ozsrvnegro.ozlan.local...[/email]
> When does the OnEndDrag event fire? I am trying to implement a browse
> where the user can drag records from a table to a inconical representation
> on a TScrollBox control. The OnBeginDrag event fires properly, but I
> cannot get the OnEndDrag event to fire.
>
> I have also noticed that there is no EndDragItem event for browses. Do you
> plan on implementing one? Specifically the TDBBrowse component is what I
> am referring to.
>
> Thanks,
>
> Andy
>

OnEndDrag Event

Publicado: Sab Dic 03, 2005 12:11 am
por awr
Ignacio,
<< The OnEndDrag event is fired on the TScrollbox control. >>
I can drag an external file off the desktop and drop it on the TScrollBox
and the event is fired, but I cannot drag a record from a TDBBrowse on a
TScrollBox and get any events to fire except the initial TDBBrowse
OnBeginDrag event.
I am quite familiar with the code in the DragDrop example. Unfortunately,
none of the controls in the example are TScrollBox or TDBBrowse.
I have attached a sample with a Label and a TListBox containing data. There
are three other controls with Drag and Drop enabled, a TDBBrowse, TScrollBox
and a TListBox. Grab an item from the TListBox containing data (upper right)
and drag it over the three controls and you'll see every assigned event
fire -- works as expected.
Next, grab the text label (Upper Left) and drag it over the three controls.
You will notice that the label OnBeginDrag event fires, but none of the drag
events assigned in the other three ccontrols fire.
"Ignacio Ortiz de Zúñiga" <iozuniga@ozs.com> wrote in message
news:4390abc0$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Andrew,
>
> Please consult the Drag & Dro sample carefuly. The OnEndDrag event is
> fired
> on the TScrollbox control.
>
> OnBeginDragITEM and OnEndDragITEM are only for TreeView controls. They
> have
> their own Drag&Drop system to allow changing any item position via Drag &
> Drop. You do not need Drag & Drop between TDBBrowse items to do what you
> need. Simply Drag & Drop is enough.
>
> Regards,
>
> "Andrew W. Ross" <awr@jps.net> escribió en el mensaje
> news:[email=4390a2f3@ozsrvnegro.ozlan.local...]4390a2f3@ozsrvnegro.ozlan.local...[/email]
>> When does the OnEndDrag event fire? I am trying to implement a browse
>> where the user can drag records from a table to a inconical
>> representation
>> on a TScrollBox control. The OnBeginDrag event fires properly, but I
>> cannot get the OnEndDrag event to fire.
>>
>> I have also noticed that there is no EndDragItem event for browses. Do
>> you
>> plan on implementing one? Specifically the TDBBrowse component is what I
>> am referring to.
>>
>> Thanks,
>>
>> Andy
>>
>
>


Attached files Test.zip (2.1 KB)Â

OnEndDrag Event

Publicado: Sab Dic 03, 2005 1:42 pm
por jfgimenez
Andrew,
> Next, grab the text label (Upper Left) and drag it over the three
> controls. You will notice that the label OnBeginDrag event fires, but none
> of the drag events assigned in the other three ccontrols fire.
Just return .T. from the label's OnBeginDrag event. Returning Nil or .F.
means that you don't want to start the drag & drop operation.
--
Regards,
Jose F. Gimenez

OnEndDrag Event

Publicado: Sab Dic 03, 2005 7:33 pm
por awr
Jose,
Thanks! Works perfectly.
"Jose F. Gimenez" <jfgimenez@wanadoo.es> wrote in message
news:[email=439192bb@ozsrvnegro.ozlan.local...]439192bb@ozsrvnegro.ozlan.local...[/email]
> Andrew,
>
>> Next, grab the text label (Upper Left) and drag it over the three
>> controls. You will notice that the label OnBeginDrag event fires, but
>> none of the drag events assigned in the other three ccontrols fire.
>
> Just return .T. from the label's OnBeginDrag event. Returning Nil or .F.
> means that you don't want to start the drag & drop operation.
>
> --
> Regards,
>
> Jose F. Gimenez
>

OnEndDrag Event

Publicado: Lun Dic 05, 2005 9:57 am
por ignacio
Andrew,
>>am quite familiar with the code in the DragDrop example.
I hope you got your problem solved with JG advice. In case not, I'll be glad
to help.
Regards,

OnEndDrag Event

Publicado: Lun Dic 05, 2005 6:33 pm
por awr
Ignacio,
Thanks for the offer. I did get it working with JG's advice. I was not
returning .T. from OnBeginDrag.
"Ignacio Ortiz de Zúñiga" <InvalidAccount@ozs.com> wrote in message
news:439400fb$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Andrew,
>
>>>am quite familiar with the code in the DragDrop example.
>
> I hope you got your problem solved with JG advice. In case not, I'll be
> glad to help.
>
> Regards,
>
>