Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » How to Print a file inside LineEdit
Re: How to Print a file inside LineEdit [message #3244 is a reply to message #3242] Mon, 15 May 2006 23:13 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Mon, 15 May 2006 22:00


You can "avoid" qtf by calling DeQtf for texts you pass... That will add escape characters that will "quote" original text in Qtf.

void  VegaTab4::PrintCB()
{ 	Report r;
//	r.Header("[A2> Page $$P");
	r << "Round 1";
    r << DeQtf("===================================================================");
    r << DeQtf("  1 =   4 Karpov, Igor         -   2 Karpov, Vadim         = 1 - 0");
    r << DeQtf("-------------------------------------------------------------------");
    Print( r, 1, "Preview");
//	Perform(r); //same format error
}


Mirek

I tried and it works. Unfortunatly there is again one more problem Smile : by default it is set the proportional font. Instead i would like to print with courier font to preserve the vertical alignment present in the file. Using UWord I got the format command to print with courier, say 11. So I've tried to embed one text line in a formatted command line with courier font like this:
void  VegaTab4::PrintCB()
{ 	Report r;
    r << "[ $$0,0#00000000000000000000000000000000:Default]"
         "[{_}%EN-US" 
         "[s0;C+92 Round 1 ]";  //it's OK
 
    r << "[s0;C+92 " << DeQtf("Round 1") << " ]";  // doesn't work
    r << "[s0;C+92 " << DeQtf("=====================================================") <<" ]" ;
   Print( r, 1, "Preview");
}

This produce problem (see attached picture) because do not recognise the final " ]" and this seems strange to me.

I've even tried
    r.SetFont(Courier(12)); 

with no success. So, is there a way to set by default the Courier font?

Luigi
index.php?t=getfile&id=137&private=0
  • Attachment: swiss6.jpg
    (Size: 8.58KB, Downloaded 2977 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to let appear by default the bar in the LineEdit?
Next Topic: Append separate Strings to a DocEdit[SOLVED]
Goto Forum:
  


Current Time: Sat Apr 27 19:29:50 CEST 2024

Total time taken to generate the page: 0.03873 seconds