| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Aug 04, 2002 5:40 am Post subject: cut and paste code???? |
|
|
what code would i need to let people cut and paste for the text box???
thanks |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Aug 04, 2002 6:03 am Post subject: ohhh btw |
|
|
btw they way i mean when someone right clicks in the text box...just thought i would explain myself better
thanks |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Aug 04, 2002 12:01 pm Post subject: |
|
|
A normal multi-line textbox will let you cut and paste when you right click. Just make sure that if you want them to be able to cut then you need to have it set so you can edit the text (not set as readonly) _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Sun Aug 04, 2002 3:21 pm Post subject: |
|
|
You can use API to Cut, Copy and Paste if you want to add them
to a pull down menu. I can show you some code for that if you wish. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Aug 04, 2002 5:15 pm Post subject: hummm will here is what i have |
|
|
well here is what i have | Code: | DIALOG ADD,STYLE,sFont,Courier New,8,,,
DIALOG ADD,LIST,lTEXT,15,0,555,180,,sFont |
i can't get any cut and paste to work right click works, but the cut and pasted is gray out  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Aug 04, 2002 5:23 pm Post subject: errrr |
|
|
edit: I CAn't even right click in the text box when i have the info there  |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Sun Aug 04, 2002 5:37 pm Post subject: |
|
|
EDIT Elements have the built in Windows right-click menu, with cut, copy, paste etc.
You are using a LIST Element which does not.
You would have to add the CLICK Style to your List, an event for the List Click and code to cut(which would have to actually be copy, and then list delete), copy, paste(which would probably be a list insert) and delete(which would be a list delete).
Not impossible, but I know you're still learning..what better way to learn  _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Aug 04, 2002 5:40 pm Post subject: |
|
|
The problem is that you are using a list box to diaplay the data.
Instead of: | Code: |
DIALOG ADD,STYLE,sFont,Courier New,8,,,
DIALOG ADD,LIST,lTEXT,15,0,555,180,,sFont |
You can use: | Code: | DIALOG ADD,STYLE,sFont,Courier New,8,,,
DIALOG ADD,EDIT,lTEXT,15,0,555,180,,MULTI,WRAP,SCROLL,sFont |
Note that you will have to use different commands, such as dialog set instead of list add _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Aug 04, 2002 5:42 pm Post subject: |
|
|
You beat me to the post, Sheep!  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Aug 04, 2002 6:41 pm Post subject: hummmm |
|
|
| ok i think i follow what you guys are saying... BUT if i change list to edit i would have to chnage all my list calls to edit right? |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Aug 04, 2002 9:49 pm Post subject: |
|
|
Yes, and it might still involve list commands to manipulate the data in the edit box...for example:
list add,list1,some text
would have to become:
| Code: |
list create,1
list add,1,@dlgtext(edit1)
list append,1,text to add at bottom
dialog set,edit1,@text(1)
list close,1
goto evloop
|
Here is what is does:
list create,1 <-- Creates a list
list add,1,@dlgtext(edit1) <-- Adds the text in EDIT1 to your list
list append,1,text to add at bottom <-- Appends text to the text of the edit box
dialog set,edit1,@text(1) <-- Sets the edit box to the text of list 1
list close,1 <-- Closes the list
goto evloop <-- Returns you to EVLOOP _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Aug 04, 2002 9:54 pm Post subject: |
|
|
| SnarlingSheep wrote: | You would have to add the CLICK Style to your List, an event for the List Click and code to cut(which would have to actually be copy, and then list delete), copy, paste(which would probably be a list insert) and delete(which would be a list delete).
|
The downside to that is that the user cannot select just what they want to copy. You would have to use a copy command that would only copy a line, not selected text... _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Sun Aug 04, 2002 11:38 pm Post subject: |
|
|
| FreezingFire wrote: | | SnarlingSheep wrote: | You would have to add the CLICK Style to your List, an event for the List Click and code to cut(which would have to actually be copy, and then list delete), copy, paste(which would probably be a list insert) and delete(which would be a list delete).
|
The downside to that is that the user cannot select just what they want to copy. You would have to use a copy command that would only copy a line, not selected text... |
ahhh hummmm |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Mon Aug 05, 2002 9:22 am Post subject: |
|
|
Of course the problem with the EDIT box that was mentioned earlier is that it has a
size limit, around 64 kB I think. I think with a LIST box this limit may only apply for each
individual line. |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Aug 05, 2002 10:46 am Post subject: |
|
|
The VDS 3x help file says there's a 32k limit on multi-line EDIT
controls, and that LISTS are limited only by available memory...
MULTI: This makes the element into a multi-line edit control, similar to Notepad (and with similar restrictions, such as an approximately 32KB limit on the size of text.)
String lists can be used to hold the contents of text files as well as lists of ASCII data. As the name implies, they are lists of strings. The length and number of strings in a string list are limited only by available memory.
Copyright 1995 - 2000 S.A.D.E. s.a.r.l. / All rights are reserved.
Also, in Windows 95 there is a limit of 32767 items in Windows lists
(created in VDS with DIALOG ADD). This is a limitation of Windows 95,
and does NOT apply to VDS lists created with LIST CREATE.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|