TListBox.Style parameter prevents from accepting

Support forum for our inter-application drag-n-drop components.

TListBox.Style parameter prevents from accepting

Postby larschris » Thu Sep 27, 2012 12:07 am

Delphi 7 with DropMaster 1.5, DMTextTarget. AcceptorControl is a TListBox.

I need to do some painting inside the ListBox and therefore put ListBox1.Style:=lbOwnerDrawFixed. But this causes the listbox to stop accepting files.

Any solutions to this behaviour? Thanks / larschris
larschris
 
Posts: 2
Joined:
Wed Sep 26, 2012 4:27 pm

Re: TListBox.Style parameter prevents from accepting

Postby DropMaster » Fri Sep 28, 2012 5:51 am

Did you do this at runtime? That would cause the window handle to be recreated which would invalidate the drag and drop. Try this. In your FormCreate event, put:

myListBox.Style := lbOwnerDrawFixed; // Or set it at design time

DMTextTarget1.AcceptorControl := nil; // disconnect drag-and-drop
DMTexTTarget1.AcceptorControl := myListBox; // reconnect drag-and-drop

Hope this helps.
_________________________
DropMaster Support
DropMaster
 
Posts: 23
Joined:
Fri Apr 15, 2011 6:32 am

Re: TListBox.Style parameter prevents from accepting

Postby larschris » Mon Oct 01, 2012 4:36 am

Thank you very much - it did the trick / Best regards
larschris
 
Posts: 2
Joined:
Wed Sep 26, 2012 4:27 pm


Return to DropMaster

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron