ich probiere gerade mal was aus. Um in ein Memofeld was anzulegen. seltsamerweise ist die Variable cNotiz leer beim speichern.
Code: Alles auswählen
#include "Gra.ch"
#include "Xbp.ch"
#include "Appevent.ch"
#include "Font.ch"
#include "Inkey.ch"
#Define CRLF Chr(13)+Chr(10)
Proc Main()
Local nEvent, mp1, mp2, oDlg, aPos:={20,500}, aRueck:={}, oStatic, oXbp, oSle1, cName:="", cNotiz:=""
Local aStruc:= { { "Name" , "C", 6, 0 }, { "Notiz" , "M", 10, 0 } }
If !file ("adr.dbf")
DbCreate( "Adr", aStruc )
Endif
oDlg := XbpDialog():new( AppDesktop(), , {10,60}, {800,600}, , .F.)
oDlg:taskList := .T.
oDlg:title :="Test"
oDlg:create()
drawingArea := oDlg:drawingArea
drawingArea:setFontCompoundName( "09.Arial" )
aPos[01]+=110
oSle1 := XbpSLE():new( drawingArea, , aPos, {100,20}, { { XBP_PP_BGCLR, XBPSYSCLR_ENTRYFIELD } } )
oSle1:tabStop := .T.
oSle1:dataLink := {|x| IIf( x==NIL, cName, cName := x ) }
oSle1:bufferLength:=4
oSle1:create()
oSle1:SetData()
oSle1:killInputFocus:={ |x,y,oSLE| oSLE:getData() }
aPos[01]+=110
oMLE:= XbpMLE():new(drawingArea)
oMLE:dataLink := {|x| IIf( x==NIL, cNotiz, cNotiz := x ) }
oMLE:create( , , {20,200}, {200,50} ) // {700,400} )
// Text aus LOCAL Variable in Editierpuffer übertragen
oMLE:setData()
oXbp := XbpPushButton():new( oDlg, , {500,20}, {90,20}, { { XBP_PP_BGCLR, XBPSYSCLR_BUTTONMIDDLE }, { XBP_PP_FGCLR, -58 } } )
oXbp:caption := "Abbrechen"
oXbp:tabStop := .T.
oXbp:create()
oXbp:activate := {|| PostAppEvent( xbeP_Close ) }
oXbp := XbpPushButton():new( oDlg, , {610,20}, {90,20}, { { XBP_PP_BGCLR, XBPSYSCLR_BUTTONMIDDLE }, { XBP_PP_FGCLR, -58 } } )
oXbp:caption := "Speichern"
oXbp:tabStop := .T.
oXbp:create()
oXbp:activate := {|| speichern(cName,cNotiz),PostAppEvent( xbeP_Close ) }
Muß ich noch irgendetwas anderes beachten. ??