Hallo Hubert,
ja, einiges von den Funktionen lässt sich sicher simpel nachbilden. Aber geht so etwas auch noch:
Code: Alles auswählen
function WAlert (cMsg, aSel, xColor, nDefault)
local nLenMsg := 0, nLenSel, nNrSemi, nRow, nCol, oWin, nID, ;
cColor, cButtColor := NIL, nRet := nDefault, cRet := "", ;
aMsgRows := {}
if ( xColor == NIL )
cColor := iif ( IsColor(), "n/w,n/w,n/w,,n/w,w+/w,w+/w,n", ;
"w/n,n/w,,,w/n,w/n")
cButtColor := iif ( IsColor(), "w+/w,w+/w,,,n+/w,n/w", ;
"w/n,n/w,,,*w/n,n/w")
elseif ( ValType (xColor) == "C" )
cColor := xColor
elseif ( ValType (xColor) == "A" )
cColor := xColor[1]
cButtColor := xColor[2]
end
TokEval (cMsg, {|x| AAdd (aMsgRows, x)}, "C", ";")
nNrSemi := Len (aMsgRows) - 1
AEval (aMsgRows, {|x| iif ( (nLenMsg < Len (x)), nLenMsg := Len(x), ) } )
nLenMsg += 4
nLenSel := 4
AEval (aSel, {|x| nLenSel += (Len (x) + 2)})
nLenMsg := Max (nLenMsg, nLenSel)
nID := 1500 + Len (aSel)
oWin := WindowNew ( (Sc_MaxRow() - (nNrSemi + 5)) / 2, ;
(Sc_MaxCol() - nLenMsg) / 2, 5 + nNrSemi, ;
nLenMsg, nGraphics, cTitle, ;
WC_EraseBackground + WC_MessageBorder + ;
WC_TitleBar + WC_Shadow + WF_Visible + ;
WF_Activate, nID, NIL, NIL, NIL, cColor)
nRow := 1
AEval (aMsgRows, {|x| SetPos (nRow, (nLenMsg - Len (x)) / 2) ,;
DispOut (x, cColor), nRow ++ } )
@ MaxRow() - 1, 0 to MaxRow() - 1, MaxCol() + 1 color cColor
nRow := MaxRow ()
nCol := (nLenMsg - nLenSel) / 2 + 2
open dialog
AEval (aSel, ;
{|x| GPushButNew (GetList, nRow, nCol, nRow, nCol + Len (x) + 1, x, ;
{|w| cRet := w:title, w:owner:interaction(I_Leave)}, ;
NIL, NIL, WF_Visible + WF_Graphical, NIL, cButtColor), ;
nCol += (Len (x) + 3) } )
WShow( .t.)
dialog modal
WClose ()
if ( EveExitState() == I_Escape)
nRet := 0
else
nRet := AScan( aSel, Trim (cRet))
end
return nRet
Wobei das kann man sicher simpel nachbauen, habe früher auch viel mit savescreen() gearbeitet, vor den Tools....
Comix ist im Prinzip Foxpro, ich denke bei ALaska gelesen zu haben das cmx aktuell unterstützt wird. Später dann auf SQL umstellen.
Mit dem Drucken müsste ich mir auch noch etwas überlegen. Für Reports (Auswertungen) habe ich schon eine Lösung, ich brauche noch etwas für normale Formulare. Aktuell habe ich da selbst was geschrieben. Die Definition steht in einer Textdatei. Aufgebaut mit Abschnitten, das sieht dann in etwa so aus:
Code: Alles auswählen
POSITION
{07m->eliteein}{00substr(aufakt->arttext,1,35)}{47IF(EMPTY(aufakt->menge)," ",str(aufakt->menge)+" "+aufakt->eh)}{80STR(aufakt->steuersatz,2,0)}{84STR(aufakt->vk)}{00m->eliteaus}
END
POSEHPREIS
{07m->eliteein}{00substr(aufakt->arttext,1,35)}{47IF(EMPTY(aufakt->menge)," ",str(aufakt->menge)+" "+alltrim(aufakt->eh))}{67STR(aufakt->EH_PREIS)}{80STR(aufakt->steuersatz,2,0)}{84STR(aufakt->vk)}{00m->eliteaus}
END
Das müsste schon zum umstellen gehen. Würde mir aber sicher auch Deine Druckerklassen ansehen.