?
Solved

Front Page Type Look

Posted on 1998-11-10
4
Medium Priority
?
153 Views
Last Modified: 2010-04-30
Dear Experts,
   Can someone please explain to me, how to get the effect displayed in Microsoft Front Page 97+ under the html view?  I want to use a richtextbox and i would like to have my program automaticly change the color of the different html tags without lagging the user.  Please respond.
-CompGuy-
0
Comment
Question by:CompGuy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 100 total points
ID: 1444193
You need to scan in the HTML as you place it into the RTB. When you see a marker in the HTML that you want to take action on, change the .SelColor property before appending the text.

I'd set up a table with tags and colors or use a SELECT CASE to make your color choice decisions.

Write if you need code for color change and/or text append.

M

0
 

Author Comment

by:CompGuy
ID: 1444194
Thanks for the reply.  First off, it sounds like you have the answer, but since I have just started using RTB's, Actually doing what your saying is a little hard.  Would you mind a simple example?  I'm going to fool around with what you've said so far to see if i can't get it for myself, but if not, I would appreciate a sample.. Thanks.
-CompGuy-
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1444195
Well, the hardest part is in scanning the HTML. You have to recognise *all* tags - even the ones you *DON'T handle.

The RichTextBox has a series of Selxxxx properties, Bold, Italic, Underline, Color, etc One you set 'em all additional text passed into the control assumes that property state.

Sooooo. You have to scan the raw HTML and watch for your codes: <B>, <U>, <I>, etc. and then adjust the state of the RTB's SelBold, SelUnderline, SelItalic, etc. properties to match. You'll also have to watch for the end codes. Imagine something like:

SELECT CASE Token
    CASE "<B>"
        RTB.SelBold = True
    CASE "<U>"
        RTB.SelUnderline = True
    CASE "<I>"
        RTB.SelItalic = True
    CASE "</B>"
        RTB.SelBold = False
    CASE "</U>"
        RTB.SelUnderline = False
.
    CASE ELSE
END SELECT

etc, etc, etc,

I can give you a form that edits a RTB and saves it to disk. It tracks all of the .SEL params. It controls them from a menu, but your code code set them as shown above.

The tricky part is what to do with unhandled HTML.

M

0
 

Author Comment

by:CompGuy
ID: 1444196
Okay, i kinda see what your saying.  That for would help though.. Could you send it to CompGuy2@aol.com?  Thanks.
-CompGuy-
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month12 days, 1 hour left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question