Solved

Printing a ComboBox

Posted on 1998-10-19
3
396 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
[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 8

Accepted Solution

by:
ZifNab earned 100 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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
How to open a new windows chrome resized and disabled the toolbar? 3 230
LAN or WAN ? 11 120
Base1 Encode/Decode 3 100
how to resize animated Gif image in delphi ? 1 61
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

734 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