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 


RICHEDIT Object (vdsobj.dll)

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Thu Dec 12, 2002 4:14 pm    Post subject: RICHEDIT Object (vdsobj.dll) Reply with quote

This is what i want to add to a richedit object :

OBJECT LOADFILE,RICHEDIT1,lst.rtf
OBJECT FORMAT,RICHEDIT1,SETFONT,Arial,12,RED
OBJECT append,RICHEDIT1,COLOUR
OBJECT FORMAT,RICHEDIT1,SETFONT,Verdana,10,BLACK
OBJECT APPEND,RICHEDIT1,My text
OBJECT SAVEFILE,RICHEDIT1,lst.rtf

It won;t change and save the different colour for each line. Any ideas?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Thu Dec 12, 2002 4:48 pm    Post subject: Reply with quote

What you have to do is use the FORMAT SELECT command to select the first character in the line (even if there is no character there) it basically just sets the cursor pointer there so it knows where to start the new formating of colors/fonts. Take a look at the rather crude example I included with the vdsobj.
Back to top
View user's profile Send private message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Thu Dec 12, 2002 4:53 pm    Post subject: Reply with quote

I still can't get it to work :

heres the code:

OBJECT LOADFILE,RICHEDIT1,lst.rtf
OBJECT FORMAT,RICHEDIT1,SETFONT,Arial,12,RED
OBJECT APPEND,RICHEDIT1,COLOUR @cr()
OBJECT COMMAND,RICHEDIT1,CLIPBOARD,SELECT,@len(@object(dlgtext,richedit1)),@len(@object(dlgtext,richedit1))
OBJECT COMMAND,RICHEDIT1,@cr()
OBJECT COMMAND,RICHEDIT1,SETFONT,Arial,10,BLACK
OBJECT APPEND,RICHEDIT1,Heres more text but different color and size
OBJECT SAVEFILE,RICHEDIT1,lst.rtf

I want to basicaly create a file, add a coloured line to it, save it, then repeat the process. Allowing different coloured lines of text.

Nathan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Thu Dec 12, 2002 5:28 pm    Post subject: Reply with quote

Hi Nathan, you seem to have a very old version of VDSOBJ, because your using the OBJECT COMMAND which no longer exists in the current version. First download the new version of VDSOBJ, then use the following code:

Code:

external vdsobj.dll

title Test
  DIALOG CREATE,Test,-1,0,536,525,CLASS mywindow
  OBJECT CLASS,mywindow
  OBJECT ADD,RICHEDIT,RICHEDIT1,10,10,400,400,,WRAP 
  DIALOG SHOW

  OBJECT LOADFILE,RICHEDIT1,lst.rtf

  OBJECT APPEND,RICHEDIT1,@cr()@cr()
  OBJECT FORMAT,RICHEDIT1,CLIPBOARD,SELECT,@len(@object(dlgtext,richedit1)),@len(@object(dlgtext,richedit1))
  OBJECT FORMAT,RICHEDIT1,SETFONT,Arial,12,RED
  OBJECT APPEND,RICHEDIT1,COLOUR

  OBJECT FORMAT,RICHEDIT1,@cr()@cr()
  OBJECT FORMAT,RICHEDIT1,CLIPBOARD,SELECT,@len(@object(dlgtext,richedit1)),@len(@object(dlgtext,richedit1))
  OBJECT FORMAT,RICHEDIT1,SETFONT,Arial,10,BLACK
  OBJECT APPEND,RICHEDIT1,Heres more text but different color and size

  OBJECT SAVEFILE,RICHEDIT1,lst.rtf

:evloop
  wait event
  goto @event()
 
 
:close
exit
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
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