<div>If you want something less idyllic and a quick (and hopefully not nasty) solution . . .</div>
<div> </div>
<div>you might train the user to Crtl+Click or double click the components they want to copy. Declare a global Tstringlist, and create in the form FormCreate event, (free it in the form's ondestroy I think), attach to the copyable components' onmousedown a method (common for components of common descent) to test the mouse down for a CRTL presence or just use the ondoubleclick.
</div>
<div> </div>
<div>Once fired, in the chosen method add to the Tstringlist the caption or text property contents.</div>
<div> </div>
<div>Add a popup menu item for the form, "Copy Chosen" or something, and put the text held in the Tstringlist onto the clipboard, or write it to stream, or send a wm_CopyData message, and always clear the Tstringlist for the next round.
</div>
<div> </div>
<div>As I said not idyllic but good enough sometimes.</div>
<div> </div>
<div>Paul</div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 25/10/05, <b class="gmail_sendername">Paul McKenzie</b> <<a href="mailto:paul@smss.org.nz">paul@smss.org.nz</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Have you looked into converting the Form (Selected area) to a canvas.<br>I can't remember how to do this (many years since I looked into this area) - I think you can print
<br>the form to a file that may give the canvas or there are functions to convert the form to a canvas -<br>It may be as easy as just looking at the Form.Canvas.<br><br>HTH<br><br>This may give some new direction or ideas...
<br><br>Regards<br>Paul McKenzie<br>Wellington<br>New Zealand<br><br><br>John Bird wrote:<br>> Even if I use one of the copy/paste aware controls, ideally what I want to<br>> do is to allow users to drag and select over a range of the screen. That is
<br>> give the user the freedom to select and copy whatever they want as though<br>> they were in a text document/email/word document etc...<br>><br>> eg to pick up a name and 3 address lines in one selection.
<br>> These are in 4 different controls, so I don't think I can do that anyway<br>> with any normal components....<br>><br>> John<br>><br>> -----Original Message-----<br>> From: Rohit Gupta [mailto:<a href="mailto:rohit@cfl.co.nz">
rohit@cfl.co.nz</a>]<br>> Sent: Tuesday, 25 October 2005 10:18 a.m.<br>> To: <a href="mailto:johnkbird@paradise.net.nz">johnkbird@paradise.net.nz</a>; NZ Borland Developers Group - Delphi List<br>> Subject: Re: [DUG] Copy and Paste
<br>><br>><br>> For Data, you should be using StaticText. Labels are not for<br>> dynamic information. I still dont know if Copy/Paste will work... but it<br>> is the more appropriate component for your purpose.
<br>><br>> From: "John Bird" <<a href="mailto:johnkbird@paradise.net.nz">johnkbird@paradise.net.nz</a>><br>> To: "'NZ Borland Developers Group - Delphi List'" <<a href="mailto:delphi@ns3.123.co.nz">
delphi@ns3.123.co.nz</a>><br>> Subject: [DUG] Copy and Paste<br>> Date sent: Fri, 21 Oct 2005 16:02:46 +1300<br>> Organization: John Bird Consulting<br>> Send reply to: <a href="mailto:johnkbird@paradise.net.nz">
johnkbird@paradise.net.nz</a>,<br>> NZ Borland Developers Group - Delphi List <<a href="mailto:delphi@ns3.123.co.nz">delphi@ns3.123.co.nz</a>><br>> <mailto:<a href="mailto:delphi-request@ns3.123.co.nz">
delphi-request@ns3.123.co.nz</a>?subject=unsubscribe><br>> <mailto:<a href="mailto:delphi-request@ns3.123.co.nz">delphi-request@ns3.123.co.nz</a>?subject=subscribe><br>><br>><br>> With data displayed in labels on a form or data displayed in
<br>> stringlists (read only) there seems no way to use the clipboard to<br>> copy and paste data. Is there a way around this, or to allow a copy<br>> and paste option do I have to either (i) put the data in the clipboard
<br>> programmatically or (ii) use a different control to display data.<br>><br>> John<br>><br>><br>> Regards<br>><br>> Rohit<br>><br>> ====================================================<br>
> ==================<br>> CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New<br>> Zealand<br>> PH (649) 489-2280<br>> FX (649) 489-2290<br>> email <a href="mailto:rohit@cfl.co.nz">rohit@cfl.co.nz
</a> or <a href="mailto:r.gupta@xtra.co.nz">r.gupta@xtra.co.nz</a><br>> ====================================================<br>> ==================<br>><br>><br>><br>><br>> _______________________________________________
<br>> Delphi mailing list<br>> <a href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a><br>> <a href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a><br>><br>
><br><br>_______________________________________________<br>Delphi mailing list<br><a href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a><br><a href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi
</a><br></blockquote></div><br>