forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


cut and paste code????
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Aug 04, 2002 5:40 am    Post subject: cut and paste code???? Reply with quote

what code would i need to let people cut and paste for the text box???


thanks
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Aug 04, 2002 6:03 am    Post subject: ohhh btw Reply with quote

btw they way i mean when someone right clicks in the text box...just thought i would explain myself better


thanks
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Aug 04, 2002 12:01 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Sun Aug 04, 2002 3:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Aug 04, 2002 5:15 pm    Post subject: hummm will here is what i have Reply with quote

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 Sad
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Aug 04, 2002 5:23 pm    Post subject: errrr Reply with quote

edit: I CAn't even right click in the text box when i have the info there Sad
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Sun Aug 04, 2002 5:37 pm    Post subject: Reply with quote

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 Wink

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Aug 04, 2002 5:40 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Aug 04, 2002 5:42 pm    Post subject: Reply with quote

You beat me to the post, Sheep! Smile
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Aug 04, 2002 6:41 pm    Post subject: hummmm Reply with quote

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
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Aug 04, 2002 9:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Aug 04, 2002 9:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Aug 04, 2002 11:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Aug 05, 2002 9:22 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Aug 05, 2002 10:46 am    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group