Spaß beiseite, Servus Leute, ich brauche mal wieder Hilfe.
Ich hab manchen ja schon erzählt, Textmodus ist bei uns immer noch ein Thema...
Aber: Man kann ja trotzdem wenn nötig grafisch anzeigen lassen, das probiere ich grade so:
[spoiler]
Code: Alles auswählen
PROCEDURE ConBox(cTitle, aMenupoints)
LOCAL nEvent, mp1, mp2, aSize, width, height, mostlength, i
LOCAL oDlg, oXbp, drawingArea, aEditControls := {}
width := Len(aMenupoints) + 1
oDlg := XbpDialog():new( SetAppWindow(), , {163,138}, {0, 0}, , .F.)
oDlg:taskList := .T.
oDlg:title := cTitle
oDlg:create()
oDlg:showModal()
drawingArea := oDlg:drawingArea
drawingArea:setFontCompoundName( "8.Arial" )
start := 8
buttonwidth := 40
FOR i := 1 TO Len(aMenupoints) STEP 1
oXbp := XbpPushButton():new( drawingArea, , {start,16}, {buttonwidth,24}, { { XBP_PP_BGCLR, XBPSYSCLR_BUTTONMIDDLE }, { XBP_PP_FGCLR, -58 } } )
oXbp:caption := aMenupoints[i]
oXbp:tabStop := .T.
oXbp:create()
oXbp:activate := {|| Msgbox(aMenupoints[i]) }
start += buttonwidth + 8
NEXT
//oDlg:show()
nResult := oDlg:showModal()
DO CASE
CASE nResult == xbeP_Close
Msgbox("beendet")
ENDCASE
// nEvent := xbe_None
// DO WHILE nEvent <> xbeP_Close
// nEvent := AppEvent( @mp1, @mp2, @oXbp )
// oXbp:handleEvent( nEvent, mp1, mp2 )
// ENDDO
RETURN NIL
Aufgerufen wird das wenn ich die Funktion Conbox("Test", {"test"}) aufrufe. Es zeigt mir das Fenster dann an, zwar gebunden im Crt-Fenster, aber immerhin. Mit dem X rechts oben kann ich es schließen, der Programmcode geht dann auch weiter (er baut mein Bildschirm auf etc, starte das zum Test ganz am Anfang). Allerdings werden jetzt keine Tastatureingaben mehr angenommen. Woran liegt das?
LG Jannik