In my c# windows form application for printing I'm using roll paper. And its working well. My format is like
Qty Item Price
1 ItemName $2.00
And I am using,
g.DrawString(item.quantity.PadRight(2) + item.menu_title.PadRight(24) + item.price, new Font("Courier New", 10, FontStyle.Bold), new SolidBrush(Color.Black), startX, startY + offset);
offset = offset + (int)fontHeight + 5;
My problem is, I tried with a long menu name, That pushes the price away. and again when I tried to calculate the menuItem length and split after a certain length and put that in a new line, I got something like,
this Is Like What I'm ge
tting.
So, my question is there any way to set a section? and split if wont fit there. like
|qty| |menuTitle-grid| |price-grid|
| 5 | |First Menu | |$5.00 |
|Title |
| 2 | |2nd Menu Title| |$2.00 |
| 1 | |Third Menu | |$3.00 |
|Title |
please enlighten me with a solution