Solved

Richedit problem

Posted on 1998-10-02
12
566 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
 
LVL 10

Accepted Solution

by:
viktornet earned 200 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now