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 #3284 is a reply to message #3260] Wed, 17 May 2006 19:16 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
The following code snippet read a text file and print it via the Report control. The font used is Courier. The size font, hf, come from the widget "FontHeight edt". Each line of the file is sent to report with
        r << "[s0;C+" + sizefont + DeQtf(line) + " ]"; 


Luigi

void  VegaTab4::PrintCB()
{ 
    Report r;
    FileIn in(filename);
    String sizefont;
    r.SetPageSize(4500, 6300); // reduce the left margin

    double hf = StrDblValue(AsString(~edt)); 
    sizefont = AsString( (int)(59 + (hf - 7.) * 10.) ) ; 

    while(!in.IsEof()) {
	String line = in.GetLine();
        r << "[s0;C+" + sizefont + DeQtf(line) + " ]"; 
    }
    in.Close();

    // Print( r, 1, "Preview");
    Perform(r);
}
  • Attachment: swiss5.jpg
    (Size: 36.78KB, Downloaded 2071 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 22:10:03 CEST 2024

Total time taken to generate the page: 0.02919 seconds