RSS
 

Aus Listbox heraus drucken

Veröffentlicht am Mai 25, 2007 um 12:58 pm

25 Mai

Im folgenden Codebeispiel wird der Inhalt der Listbox “lstTest” ausgedruckt.

  dim g as Graphics
  dim page as PrinterSetup
  dim h,w,x,z,mw,mh as Integer
  page = new PrinterSetup
  g = OpenPrinterDialog(page)
  if g = Nil then
    return
  end if
  g.TextFont = "Arial"
  g.TextSize = 12
  w = g.Width/lstDruck.columnCount
  h = g.textHeight
  for x = 0 to lstTest.ListCount-1
    for z = 0 to lstTest.columnCount-1
      g.DrawString lstTest.cell(x,z), (z*w), (x*h)+h
    next
  next
 

Tags:

Hinterlassen Sie eine Nachricht