Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Richedit problem

Posted on 1998-10-02
12
Medium Priority
?
585 Views
Last Modified: 2013-11-22
Is there a way to set limits/margins in a richedit control so that when the controld is resized, the text keeps within these limits/margins.
0
Comment
Question by:davidgreen
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 5

Expert Comment

by:inter
ID: 1341497
Does not WordWrap property of rich edit solves the problem?
0
 
LVL 10

Expert Comment

by:Jacco
ID: 1341498
Call repaint on resize?
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1341499
Margens aren't supported in the standerd RichEdit component, because they aren't supported in the underlying RichEdit window-component.

Can't you make use of a panel?

Zif.

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 10

Accepted Solution

by:
viktornet earned 800 total points
ID: 1341500
procedure SetMargin(VeryRich : TRichEdit; Indent : Integer);
Var
  R : TRect;
begin
  R := VeryRich.ClientRect;
  R.Left:=R.Left + Indent;
  R.Top:=R.Top + 2;
  R.Bottom:=R.Bottom - 2;
  R.Right:=R.Right - Indent;
  SendMessage(VeryRich.Handle, EM_SETRECT, 0, Longint(@R));
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  SetMargin(RichEdit1, 10);
end;

Regards,
Viktor Ivanov
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1341501
hey viktor, that looks nice!
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1341502
:->
0
 

Author Comment

by:davidgreen
ID: 1341503
Sorry this took so long.. my email has been screwed up.. Thanks!
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1341504
No problem :-)

Cheers,
Viktor
0
 

Author Comment

by:davidgreen
ID: 1341505
I gave the points before checking the code like a dummy!!!!  I cannot get this to work!!!!!!

Well... win some..lose some..

0
 
LVL 10

Expert Comment

by:viktornet
ID: 1341506
Please tell me what is wrong so I can fix it for you. Don't worry we'll get this thing to work on your machine too. It works here.

Regards,
Viktor Ivanov
0
 

Author Comment

by:davidgreen
ID: 1341507
Lets say we have some text with the right margin set at a certain position. I want to be able to resize the form but have the text stopin the position it has been set at... so if I set the right margin at say 400 pixels.. I still wan 400 pixels if I increase the form size..
Is that clearer?
Thanks Viktor for your help.

0
 
LVL 10

Expert Comment

by:viktornet
ID: 1341508
I'm not sure what you are talking about., Do you mind to create a project source code and send it to me and put some comments where what you are trying to do...?? PLease clarify some things...

btw- My e-mail address is viktor@megsinet.net

Cheers,
Viktor
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

916 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