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 


VDSOBJ: 'Object Format' Fonts

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements
View previous topic :: View next topic  
Author Message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri Dec 30, 2005 5:40 pm    Post subject: VDSOBJ: 'Object Format' Fonts Reply with quote

I figured out how to change fonts on selected text. However, I can't figure out how to set the font for new text starting at the current carrot position.

If the user has typed some text then decides to change the the font from where they left off, the font dosen't change. I don't have a problem when appending text programmically, only when the enduser is inputing text.

Code:
:FontMenu
  %%Bold = off
  %%Italic = off
  %%Unline = off
  OPTION FONTDLG,EXTENDED
  %%tFont = @FONTDLG(%%Font,%%FontSize,%%FontStyle,%%FontColor)
  If @ok()
   parse "%%Font;%%FontSize;%%FontStyle;%%FontColor", %%tFont
   If @unequal(@pos(B,%%FontStyle),0)
    %%Bold = on
   End
   If @unequal(@pos(I,%%FontStyle),0)
    %%Italic = on
   End
   If @unequal(@pos(U,%%FontStyle),0)
    %%Unline = on
   End
  End
  # Note: If no text is selected the current carrot position is returned
  %%sel = @OBJECT(SELPOS,RICHEDIT2,SE)
  info %%sel
  parse "%%selS;%%selE", %%sel
  OBJECT FORMAT,RICHEDIT2,CLIPBOARD,SELECT,%%selS,%%selE
  OBJECT FORMAT,RICHEDIT2,BOLD,%%Bold
  OBJECT FORMAT,RICHEDIT2,ITALIC,%%Italic
  OBJECT FORMAT,RICHEDIT2,UNDERLINE,%%Unline
  OBJECT FORMAT,RICHEDIT2,SETFONT,%%Font,%%FontSize,%%FontColor
  OBJECT FOCUS,RICHEDIT2
  goto evloop


Thanks in advance,
Aslan
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 -> Other Product Support/Announcements 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