Solved

Printing contents of RichEdit

Posted on 2000-03-04
3
273 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 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Delphi application Soap connection 5 123
How to renew a Delphi rad-studio licence? 5 69
can't find the executable in Simulator 1 101
CheckListBox usage 3 71
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

830 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