Simple Option...
1/ Turn off HideSelection on the controls you want to do multi select
from.... This allows them to select from more than one control.
2/ override keypress and controll the copy paste keys yourself like
this little hack
procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
s:string;
i:integer;
begin
if shift = [ssCtrl] then
begin
if ( Key = Ord('C') ) or (Key = ord('c')) then
begin
for i := 0 to ControlCount -1 do
if Controls[i] is TEdit then
begin
if (Controls[i] as TEdit).SelLength > 0 then
s := s + (Controls[i] as TEdit).SelText + #13#10;
end;
ShowMessage(s);
end;
end;
end;
you now have multi selections with visibility
On 10/25/05, John Bird <[EMAIL PROTECTED]> wrote:
> Even if I use one of the copy/paste aware controls, ideally what I want to
> do is to allow users to drag and select over a range of the screen. That is
> give the user the freedom to select and copy whatever they want as though
> they were in a text document/email/word document etc...
>
> eg to pick up a name and 3 address lines in one selection.
> These are in 4 different controls, so I don't think I can do that anyway
> with any normal components....
>
> John
>
> -----Original Message-----
> From: Rohit Gupta [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 25 October 2005 10:18 a.m.
> To: [EMAIL PROTECTED]; NZ Borland Developers Group - Delphi List
> Subject: Re: [DUG] Copy and Paste
>
>
> For Data, you should be using StaticText. Labels are not for
> dynamic information. I still dont know if Copy/Paste will work... but it
> is the more appropriate component for your purpose.
>
> From: "John Bird" <[EMAIL PROTECTED]>
> To: "'NZ Borland Developers Group - Delphi List'" <[email protected]>
> Subject: [DUG] Copy and Paste
> Date sent: Fri, 21 Oct 2005 16:02:46 +1300
> Organization: John Bird Consulting
> Send reply to: [EMAIL PROTECTED],
> NZ Borland Developers Group - Delphi List <[email protected]>
> <mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED]>
>
>
> With data displayed in labels on a form or data displayed in
> stringlists (read only) there seems no way to use the clipboard to
> copy and paste data. Is there a way around this, or to allow a copy
> and paste option do I have to either (i) put the data in the clipboard
> programmatically or (ii) use a different control to display data.
>
> John
>
>
> Regards
>
> Rohit
>
> ====================================================
> ==================
> CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New
> Zealand
> PH (649) 489-2280
> FX (649) 489-2290
> email [EMAIL PROTECTED] or [EMAIL PROTECTED]
> ====================================================
> ==================
>
>
>
>
> _______________________________________________
> Delphi mailing list
> [email protected]
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
--
Kyley Harris
Harris Software
+64-9-8455274
+64-21-671-821
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi