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 


Create editor [SOLVED]

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


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Sat Jul 25, 2009 3:02 am    Post subject: Create editor [SOLVED] Reply with quote

Hi Forum,
I need to build a simply editor using vdsobj extension

I would like this editor festure:
- insert an image
- intert text with different colour an font
- possibility to change font or colour of a selected text
I started to write this
but some thing I unknow how to make Sad
this is my sorce code
Code:
Title Editor

External VdsObj.dll
#Define Command,Object
#Define Function,Object

%%Bold =
%%Italic =
%%Sottolinea =

  DIALOG CREATE,Editor,-1,0,528,312,ONTOP,CLASS Principale
  Object Class,Principale
  OBJECT ADD,COLORCOMBO,COLORCOMBO1,3,289,180,26,,CLICK,SHOWCUSTOMCOLOR
  OBJECT ADD,FONTCOMBO,FONTCOMBO1,5,95,180,26,Arial,CLICK,SHOWSAMPLES
  DIALOG ADD,BITBTN,Bold,8,8,24,24,#BLD.BMP
  DIALOG ADD,BITBTN,Italic,9,33,24,24,#ITL.BMP
  DIALOG ADD,BITBTN,Sottolineato,8,60,24,24,#UNDRLN.BMP
#  DIALOG ADD,LINE,LINE1,32,9,497,249
  OBJECT ADD,RICHEDIT,RICHEDIT1,32,9,497,249,,WRAP,SCROLL,TABS
#  DIALOG ADD,COMBO,Font,5,95,180,26
#  DIALOG ADD,COMBO,Colore,3,289,180,26
  DIALOG ADD,BUTTON,Esci,288,439,64,24,Esci
  OBJECT FORMAT,RICHEDIT1,SETFONT,Arial,18,DKBLUE
  DIALOG SHOW
:Loop
  Wait Event
  %e = @Event()
  Goto %e
 
:BoldButton 
Object Focus,Richedit1
%T = @OBJECT(SELPOS,Richedit1,SE)
#Info %t
Object Focus,Richedit1
Parse "%I;%F",%t
If @equal(%I,0)@equal(%F,0)@Equal(%I,%F)
  %I =@len(@object(dlgtext,richedit1))
  %F =@len(@object(dlgtext,richedit1)) 
End
Object Focus,Richedit1
If %%Bold
  OBJECT FORMAT,RICHEDIT1,CLIPBOARD,SELECT,%I,%F)
  OBJECT FORMAT,RICHEDIT1,BOLD,OFF
Else
  OBJECT FORMAT,RICHEDIT1,CLIPBOARD,SELECT,%I,%F)
  OBJECT FORMAT,RICHEDIT1,BOLD,ON
End
%%Bold = @Not(%%Bold)
Object Focus,Richedit1
Goto Loop

:FontCombo1Click
:ColorCombo1Click
  %F = @object(item,fontcombo1)
  %C = @object(item,colorcombo1)
  OBJECT FORMAT,RICHEDIT1,CLIPBOARD,SELECT,@len(@object(dlgtext,richedit1)),@len(@object(dlgtext,richedit1))
  OBJECT FORMAT,RICHEDIT1,SETFONT,%F,14,%C
  goto Loop

Object Focus,Richedit1
%T = @OBJECT(SELPOS,Richedit1,SE)
#Info %t
Object Focus,Richedit1
Parse "%I;%F",%t
If @equal(%I,0)@equal(%F,0)@Equal(%I,%F)
  %I =@len(@object(dlgtext,richedit1))
  %F =@len(@object(dlgtext,richedit1)) 
End
Object Focus,Richedit1
If %%Bold
  OBJECT FORMAT,RICHEDIT1,CLIPBOARD,SELECT,%I,%F)
  OBJECT FORMAT,RICHEDIT1,BOLD,OFF
Else
  OBJECT FORMAT,RICHEDIT1,CLIPBOARD,SELECT,%I,%F)
  OBJECT FORMAT,RICHEDIT1,BOLD,ON
End
%%Bold = @Not(%%Bold)
Object Focus,Richedit1
Goto Loop

:EsciButton
:Close
Object Remove,RichEdit1 
Object Remove,ColorCombo1
Object Remove,FontCombo1
Stop

Someone can help me please?

I need this editor to insert in a program I'm making

Many tnx in advance for any info or help


Last edited by Tdk161 on Sat Nov 13, 2010 3:48 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Sun Jul 26, 2009 3:29 pm    Post subject: Reply with quote

Hi Tdk161:

I have an application that I use VDSObj with a rich text editor. You can see a screenshot in my web:

http://vds.uvedese.es/index.php?option=com_content&task=view&id=112&Itemid=5

VDSObj.dd supports VDS 6 but not working properly because when you activate the other element, RiCHEDIT element loses focus. With VDS5 It works correctly.

I do not know if I helped you. I try to be more concise if you need it... Wink
Back to top
View user's profile Send private message Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Sun Jul 26, 2009 5:47 pm    Post subject: Reply with quote

Hi Uvedese Smile
I looked your software (very nice) and yes, I need to insert in my software a simple text editor like your to create some text file in richtext format, but I have some trouble to create it Sad
If you like I can explain you what I want make with this software

Many tnx
Byez
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
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