Board index » off-topic » Copy and paste
|
Vasant
Delphi Developer |
|
Vasant
Delphi Developer |
Copy and paste2003-07-06 06:12:50 AM off-topic0 I would like to Copy a word and paste word. In Pascal 5.5 How I do? Thank you. |
| Vasant
Delphi Developer |
2003-07-09 06:12:38 PM
Re:Copy and paste
Yes.
How I do? Thank you |
| Markus Humm
Delphi Developer |
2003-07-10 12:34:39 AM
Re:Copy and paste
Vasant schrieb:
QuoteYes. QuoteHow I do? {smallsort} |
| Femme Verbeek
Delphi Developer |
2003-07-11 08:13:03 PM
Re:Copy and paste
"John Herbster (TeamB)" <herb-sci1_at_sbcglobal.net>schreef in bericht
Quote
ctrl k b to set the begin marker ctrl k v to set the end marker ctrl k v moves the block to a new location ctrl k c copies the block to a new location ctrl k y deletes the block Not sure if 5.5 supports this (it does in 7.0) Alternatively to make a block Put the cursor on one location, and keep the shift key pressed while moving it with the arrow keys to another location or just dragg the mouse to select a block Not sure if 5.5 supported an internal clipboard but Shift+Del = Cut Ctrl+Ins = Copy Shift+Ins = Paste Ctrl+Del = Clear You can also copy and paste to and from the windows clipboard. In that case the program has to be running in a dos box. Only the visible text can be copied. Right-click the top of the frame around the dos box select edit | mark (don't know if this is the correct translation, I have a dutch windows version) drag the mouse to highlight the text area to be selected press enter to copy the text to the windows clipboard. Now go to the windows program of your choise and press ctrl V to paste the text at cursor location. Pasting from the windows clipboard to the TP editor is with the same trick Right-click the top of the frame around the dos box select edit | paste hth |
| Vasant
Delphi Developer |
2003-07-12 07:55:17 AM
Re:Copy and paste
I read on help page. I see.
But I can't open edit-menu in Pascal 5.5 . |
| Femme Verbeek
Delphi Developer |
2003-07-18 06:58:52 PM
Re:Copy and paste
"Vasant" < XXXX@XXXXX.COM >schreef in bericht
QuoteI read on help page. I see. F10 and use the arrow keys. |
| Veebo
Delphi Developer |
2004-10-05 04:50:15 AM
Re:Copy and paste
Hi,
I am making an application which allows user to create new buttons, labels, groupboxes, pagecontrols, panels etc. I want to allow the user to be able to click the control he wants to copy and just click on Edit ->Copy on the menu. (I have this working). Then I want user to click ont the form (or on a control such as a panel, or a groupbox, or a tabsheet), and then click Edit->Paste and that "copied" control gets pasted. Lets assume that the copied control was a panel, which had a label and a button on it. When Edit->Paste is clicked, I want a Panel including a button and a label. is there a simple easy way to do this? I tried using Assign, but not sure if that's a correct way. I know a complicated method would be.. -- when Edit->Copy is clicked, set the pointer, say, MyCopiedControl to the active control. -- now when Edit->Paste is clicked, create a new control of the same class as MyCopiedControl. Then go through each control of MyCopiedControl->Controls and create it. This seems like a lengthy method. Is there a quick easy function that is already available in BCB that will allow me to do this... something like DestinationControl->CopyFrom(SourceControl) please respond if you have some ideas. Thanks a bunch. cheers, Veebo |
| Remy Lebeau (TeamB)
Delphi Developer |
2004-10-05 05:03:28 AM
Re:Copy and paste
"Veebo" < XXXX@XXXXX.COM >wrote in message
Quoteis there a simple easy way to do this? QuoteI tried using Assign, but not sure if that's a correct way. QuoteIs there a quick easy function that is already available |
| Veebo
Delphi Developer |
2004-10-05 05:44:34 AM
Re:Copy and paste
Can you say a bit more about this. I looked into this, but
can't figure out how to use it. I need to derive a class, say MyStreamClass from TStream and then instantiate it.. MyStreamClass *pStream = new MyStreamClass(this); then do this? TComponent *pNewComp = pStream->ReadComponent( (TComponent *) MyCopiedControl); pStream->WriteComponent(pNewComp); how does the newly created component's parent gets ditermined? how about the location? will it endup being created right on the top of the source component? please give me a couple more hints if you can. thanks, Vaibhav Quote>is there a simple easy way to do this? |
| Remy Lebeau (TeamB)
Delphi Developer |
2004-10-05 06:03:41 AM
Re:Copy and paste
"Veebo" < XXXX@XXXXX.COM >wrote in message
QuoteI need to derive a class, say MyStreamClass from TStream QuoteTComponent *pNewComp = pStream->ReadComponent( (TComponent *) //... pStream->Position = 0; TMyComponent *pNewComp = (TMyComponent*) pStream->ReadComponent(NULL); pNewComp->Parent = whatever; Quotehow does the newly created component's parent gets ditermined? Gambit |
| Veebo
Delphi Developer |
2004-10-05 06:57:25 AM
Re:Copy and paste
hi,
I tried the following: TComponent *pComp; TMemoryStream *pStream = new TMemoryStream(); pStream->WriteComponent( (TComponent *)MyCopiedControl); pStream->Position = 0; TPanel *pPanel = (TPanel*) pStream->ReadComponent(NULL); pComp = pStream->ReadComponent(NULL); but each time it crashes with the error: "Project XYZ raised exception class EClassNotFound with message 'Class TMyClass' not found." where TMyClass is the whatever type of class I tried to paste such as TPanel or TGroupBox etc. MyCopiedControl is the pointer to the Control that I am trying to paste. It is of type TControl* Can you tell whats going on here? Why do I keep getting this error. thanks, Veebo ">No. It would be like this instead: Quote
|
| Veebo
Delphi Developer |
2004-10-05 07:20:19 AM
Re:Copy and paste
the code in previous post should have been the following
// TPanel *pPanel = (TPanel*) pStream->ReadComponent(NULL); pComp = pStream->ReadComponent(NULL); I tried a couple of different ways. they should do the same thing, but I just tried both because it crashed with the top line, so i commented it and tried the bottom.. just incase. |
| Remy Lebeau (TeamB)
Delphi Developer |
2004-10-05 07:20:48 AM
Re:Copy and paste
"Veebo" < XXXX@XXXXX.COM >wrote in message
QuotepStream->WriteComponent( (TComponent *)MyCopiedControl); QuotepComp = pStream->ReadComponent(NULL); Quotebut each time it crashes with the error: |
| Veebo
Delphi Developer |
2004-10-05 07:44:51 AM
Re:Copy and pasteQuoteIs your copied component a TPanel to begin with? Quote
Quote
if not, how can I register them. I tried a bunch of things, but it doesn't work. For example, if I want to register TPanel, how can I do that? Can it be done just befor the code for paste? thanks a bunch, Veebo |
| Remy Lebeau (TeamB)
Delphi Developer |
2004-10-05 07:50:41 AM
Re:Copy and paste
"Veebo" < XXXX@XXXXX.COM >wrote in message
Quoteif not, how can I register them. I tried a bunch of things, |
