[SOLVED] printing the content of wxTextCtrl Topic is solved
[SOLVED] printing the content of wxTextCtrl
Hi!
I have a window with several text controls and i would like to print all the fields which they contains, but i don't want to print the entire window, only the text in the form...
which function i have to use to do this?
is there any sample to see?
thanks to all!!!
I have a window with several text controls and i would like to print all the fields which they contains, but i don't want to print the entire window, only the text in the form...
which function i have to use to do this?
is there any sample to see?
thanks to all!!!
Last edited by rocco.g on Sat Mar 25, 2006 10:29 am, edited 1 time in total.
i saw the sample code in wxdevcpp but i need only to print what is write in wxTextCtrl and not the entire page...
i did a search in the forum and i have found nothing, only this topic: http://forums.wxwidgets.org/viewtopic.p ... t=printing
but it isn't solved...
can u help me... please?
(sorry for my english)
i did a search in the forum and i have found nothing, only this topic: http://forums.wxwidgets.org/viewtopic.p ... t=printing
but it isn't solved...
can u help me... please?
(sorry for my english)
Sorry Rocco, I meant to dig out some code for you.
I'll get around to it today.
I'll get around to it today.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
-
- Super wx Problem Solver
- Posts: 466
- Joined: Sat Sep 18, 2004 2:49 am
- Location: California, USA
You can use HTMLEasyPrinting.
In the below example, try populating the strA and strQ varaibles with text control values.
-Guru Kathiresan
In the below example, try populating the strA and strQ varaibles with text control values.
Code: Select all
wxString strHTML = "<html> \n";
wxString strQ = "What is your Name ?";
wxString strA = "My Name is wxHtmlEasyPrinting !";
strQ = StrReplace(strQ,"\r","<br>");
strA = StrReplace(strA,"\r","<br>");
strQ = StrReplace(strQ,"\n","<br>");
strA = StrReplace(strA,"\n","<br>");
strHTML = strHTML + " <p> \n";
strHTML = strHTML + " <b> " + strQ + " </b> <br> <br>\n";
strHTML = strHTML + strA + "\n";
strHTML = strHTML + "</p>";
strHTML = strHTML + " \n</html>";
wxHtmlEasyPrinting easyPrint("Question to HTML Easy Printing",this);
easyPrint.SetHeader(wxString("HTML Easy Printing -") + wxT("(@PAGENUM@/@PAGESCNT@)<hr>"), wxPAGE_ALL);
easyPrint.PreviewText(strHTML);
-
- Super wx Problem Solver
- Posts: 466
- Joined: Sat Sep 18, 2004 2:49 am
- Location: California, USA
A small note : After you find a post answered your question, you need to mark that post as acceptable one not the one you have replied to say thanks. The reason I'm telling you this is, people will be confused to see a post that doesnt give any solution for a problem and marked as acceptable answer.
-Guru Kathiresan
-Guru Kathiresan
-
- Super wx Problem Solver
- Posts: 466
- Joined: Sat Sep 18, 2004 2:49 am
- Location: California, USA