Reminisce
Active Member
Hello, I want to be able to get the height of nodes on this panel and print this panel on a thermal printer paper. It is an invoice for a restaurant menu.
B4X:
Dim pnlheight As Int = 0
For Each v As B4XView In pnlprint.GetAllViewsRecursive
If v Is CustomListView Or v Is Label Or v Is ImageView Then
pnlheight = pnlheight + v.Top + v.Height
End If
Next
Log(pnlheight&"pnlheight")
'clvtoprint.AsView.Height= pnlheight
pnlprint.Height = pnlheight
The code above, doesn't set the correct height.
B4X:
Dim pj As PrinterJob = PrinterJob_Static.CreatePrinterJob
pj.ShowPageSetupDialog(Null)
pj.PrintPage(pnlprint)
pj.EndJob