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

x
?
Solved

Printing a ComboBox

Posted on 1998-10-19
3
Medium Priority
?
400 Views
Last Modified: 2010-04-06
I have tried useing the Print() function to print a form,
but why it not prints the text of the ComboBox? (Delphi 3)
0
Comment
Question by:MikeWang
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 300 total points
ID: 1343356
Hi MikeWang,

I believe it has to do with the reaction of the TCombobox with the WM_Paint message...

use this article for printing your form :

http://www.inprise.com/devsupport/delphi/ti_list/TI3155.html

Regards, Zif.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1343357
Hello MikeWang!

Why not try this one :-)

var
  F : TextFile;
begin
  AssignPrn(F);
  try
    Rewrite(F);
    Printer.Canvas.Font.Assign(ComboBox1.Font);
    WriteLn(F, ComboBox1.Text);
  finally
    CloseFile(F);
  end;
end;

Haven't tested this one, but if it works please don't forget the credit ;->

Cheers,
Viktor
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1343358
Viktor,

 Isn't this for only printing the combobox text? I don't think that this is what MikeWang wants.

 MikeWang uses the Print property of the form. Thus he wants to print the whole form. This print property then doesn't print the combobox text... To get the whole form printed + the selected text in the combobox, you better use the method presented in the Inprise Example.

Regards, Zif.
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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Screencast - Getting to Know the Pipeline
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