<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Thanks Matt</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I was wondering about that overnight.&nbsp; I was 
going to try a EndDrag before doing the Free.&nbsp; That may work as 
well.&nbsp;&nbsp;But I thought of a better way to do it.&nbsp; I don't need to 
delete the checkbox and create another one.&nbsp; I can use the Move method of 
the TList to change the position in the list.&nbsp; I had forgotten this method 
existed.&nbsp; I don't use TLists very often.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Cheers,</FONT></DIV>
<DIV><FONT face=Arial size=2>Ross.</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=matt@ferndigital.com href="mailto:matt@ferndigital.com">Matt Comb</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@ns3.123.co.nz 
  href="mailto:delphi@ns3.123.co.nz">NZ Borland Developers Group - Delphi 
  List</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, October 01, 2004 5:48 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [DUG] TCheckGroup</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=Arial size=2>You can't delete this item at this stage as its 
  used for other&nbsp;methods internally&nbsp;fired with the drag drop event. 
  Instead try something like this:</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>1. replace oldcb.free with postmessage 
  e.g.</FONT></DIV>
  <DIV><FONT face=Arial 
  size=2>postmessage(self.handle,wm_user+1,0,0);</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>2. Declare in the CheckGroup Object a new method 
  receiving your message. e.g.</FONT></DIV>
  <DIV><FONT face=Arial size=2>procedure DeleteSomething(var Message: TMessage); 
  message WM_user+1;</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>3. Setup the Method and move the lines beneath 
  the oldcb.free into it. e.g.</FONT></DIV>
  <DIV><FONT face=Arial size=2>procedure TCheckGroup.DeleteSomething(var 
  Message: TMessage);<BR>begin<BR>&nbsp;&nbsp;&nbsp;&nbsp; if assigned(freeob) 
  then begin</FONT></DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  freeandnil(freeob);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  ArrangeCheckBoxList;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;FUpdating 
  := False;<BR>&nbsp;&nbsp;&nbsp; e</FONT><FONT face=Arial 
  size=2>nd;</FONT></DIV>
  <DIV><FONT face=Arial size=2>end;</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Code not great but gives you the 
  idea.</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Matt.</FONT></DIV></BLOCKQUOTE></BODY></HTML>