[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

AutoIndents in RichEdit - Delphi 4.0

Posted on 2000-02-21
7
Medium Priority
?
272 Views
Last Modified: 2013-11-22
I'm creating an editor using a TRichEdit component in Delphi 4.0.  I want to emulate the AutoIndent feature from the Delphi code editor.  I've had no luck so far.  I've been able to read the number of blanks from the last line typed but haven't been able to do anything with that information.  Also, how to get the backspace key to go back incrementally through the indents?

Basically I don't think my approach is working so I'm looking for a ground up solution to this if possible.  Any help would be greatly appreciated.

Thanks in advance.
0
Comment
Question by:Orca
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 5

Expert Comment

by:TheNeil
ID: 2543156
Just a crazy top of my head idea but could you use tabs instead?

The Neil
0
 

Author Comment

by:Orca
ID: 2543185
That's one of the things I tried.  I pulled the number of blank spaces from the line previously typed and then tried to set the value of Tab[0] to the number of spaces multiplied by the width of either a space (which was something like 3 pixels) or a letter (such as 'w' which is like 8 pixels).  Since the tab stops have to be in pixels and not characters, that got me a value.  When I set that tab stop to that value, I could tab over, but it never lined up quite right with the line above it.  Granted, I could have been doing something wrong but it just didn't seem like the best way to go.  Which brings me to my original post.

Thanks though...
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2543204
Why not skip back up to the line above, delete the spaces, and insert your new tab then? It'll all line up correctly

The Neil
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 8

Accepted Solution

by:
ZifNab earned 400 total points
ID: 2543302
Orca,

have a look at the FWS mwEdit components.... It got all what you need and is a new editor from ground-up... It is also comming with full-source.

http://www.eccentrica.org/gabr/mw/mwedit.htm

Let us know if this is what you want or if you still prefer to write it yourself

Regards, Zif.
0
 

Author Comment

by:Orca
ID: 2543579
TheNeil: I'm not sure I follow what you're saying there...

ZifNab: I'll check out the components and let you know.  Thanks.
0
 

Author Comment

by:Orca
ID: 2546435
Zif,

Thanks for the link to those components.  They'll do everything I need and then some.  I should be able to tease out how they're doing it from their source.

I accepted your answer so you'll get the points.

Thanks.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2546454
Thanks Orca. Happy hunting to specific source code strips :-)

Zif.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

649 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