What are the codes for print using listview??
thanks

Recommended Answers

Same as for printing anything else. I am just getting into printing and it isn't pretty. You have to calculate the position of every element on the page. A very good document (PDF) can be found here

http://media.wiley.com/product_ancillary/74/04705328/DOWNLOAD/532874_both02_p2.pdf

Essentially you …

Jump to Post

All 2 Replies

Ours is not a free code supply service.

You need to read books for all that.

Same as for printing anything else. I am just getting into printing and it isn't pretty. You have to calculate the position of every element on the page. A very good document (PDF) can be found here

http://media.wiley.com/product_ancillary/74/04705328/DOWNLOAD/532874_both02_p2.pdf

Essentially you are going to have to do something like the following (only more complicated)

set initial x,y page coordinates

for each item in ListView.Items
    draw item.Text at x,y
    for each subitem in item.SubItems
        increment y
        draw subitem.Text at x,y
    next
    increment x
    reset y
next

Keeping in mind that the above pseudo-code does not do pagination. You'll understand if you read the PDF I referenced above.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.