[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Printing contents of RichEdit

Posted on 2000-03-04
3
Medium Priority
?
280 Views
Last Modified: 2013-11-22
Hi Experts,


In my application I have a Form with a PageControl on it.
At runtime I create the TabSheets for the Pagecontrol.
On each TabSheet I put (also at runtime of course) a RichEdit.

Now my question:
  I also have a button on the Form which has to print the contents
  of the RichEdit of the CURRENTLY SELECTED tabsheet.
  How can I do this ?


Thanx in advance,

The Mayor.
0
Comment
Question by:wimmeyvaert
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 200 total points
ID: 2583399
hi,

you can do like below:
Regards Barry


procedure TForm1.Button1Click(Sender: TObject);
var
  i : integer;
begin
with pagecontrol1.ActivePage do begin
  for i := Controlcount -1 downto 0 do
    begin
      if( Controls[ i ] is TRichedit )then
      begin
        (Controls[ i ] as TRichedit).Print('');
      end;
  end;
 end;
  end;
0
 
LVL 6

Author Comment

by:wimmeyvaert
ID: 2591319
Hi Barry,

Thanks for your answer !

Shortly before you posted your answer, I had found a solution myself, but I have to admit yours is better than mine.

Therefor, I'll accept your answer and give you the points.

Thanx again,

The Mayor.

By the way, do you know the existance of a dbgrid-freeware component (with source) which has more functionality than the one that comes with Delphi (automatically sorting columns, ...) ?
0
 
LVL 17

Expert Comment

by:inthe
ID: 2592403
hi,
i dont use dbgrids much ,i do use a free one but i use it for the memo feild as it has some properties i need.
i would sugest try
www.torry.ru etc that would be best place to start looking(or ask a questio here for 25 or so points asking if anyone knows of one..
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Integration Management Part 2
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

834 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