Solved

Printing contents of RichEdit

Posted on 2000-03-04
3
277 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
[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
3 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 50 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
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…

691 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