gotfocus for dc_tabpage
Posted: Wed Jan 08, 2014 3:10 am
Hello Roger,
it seems that the gotfocus codeblock is called twice every time, what can I do to prevent this ?
regards
Rudolf
it seems that the gotfocus codeblock is called twice every time, what can I do to prevent this ?
regards
Rudolf
Code: Select all
bGotFocus := {||Build_t2(2,GetList,oBrowse),dc_getrefresh(aoTabMsg[2])}
@ 0,0 DCTABPAGE aoTabPage[2] CAPTION '&Transaktionen' RELATIVE aoTabPage[1] STATICAREA aoTabStatic[2];
GOTFOCUS bGotFocus PARENT oMainStatic ACCELKEY xbeK_ALT_T
...
function build_t2(nTab,aGetlist,oBrowse)
******************************************************************
local getlist := {}
local getoptions := {}
local nLeft := SIZE_X-20
local nLine := 1
local bColor,oDialog
if !aTabs[nTab]
@ .5,.5 DCSAY {||DP_KUNNAME} SAYHVCENTER FONT '12.Arial Bold' SAYSIZE SIZE_X - 22,1.4 PARENT aoTabStatic[nTab] COLOR GRA_CLR_YELLOW,GRA_CLR_DARKBLUE OBJECT aoTabMsg[nTab]
@ 2.1,.5 DCBROWSE oBrowse9 PARENT aoTabStatic[nTab] ALIAS "DOKU" SIZE SIZE_X-22,SIZE_Y-6 FREEZELEFT { 1 } PRESENTATION cstat("BROWSEPRES") ID 'BROWSE4' SCOPE;
COLOR {||{GRA_CLR_BLACK,GraMakeRGBColor(cstat("SYS_BROWSECOLOR"))}} DATALINK {||doku->(edit_doku(0,getlist,"KUN"))} CURSORMODE XBPBRW_CURSOR_ROW ZEBRA {|lEven|zebra(lEven)}
DCBROWSECOL FIELD doku->nummer WIDTH 3 HEADER "Nummer" PARENT oBrowse9 ID 'BROWSE9_1'
DCBROWSECOL FIELD doku->art WIDTH 5 HEADER "Art" PARENT oBrowse9 ID 'BROWSE9_2'
DCBROWSECOL FIELD doku->TEXT WIDTH 20 HEADER "Text" PARENT oBrowse9 ID 'BROWSE9_5'
DCBROWSECOL FIELD doku->dokument WIDTH 50 HEADER "Dokument" PARENT oBrowse9 ID 'BROWSE9_6'
DCBROWSECOL FIELD doku->user WIDTH 5 HEADER "User" PARENT oBrowse9 ID 'BROWSE9_7'
DCBROWSECOL FIELD doku->datum WIDTH 5 HEADER "Datum" PARENT oBrowse9 ID 'BROWSE9_3'
DCBROWSECOL FIELD doku->zeit WIDTH 5 HEADER "Zeit" PARENT oBrowse9 ID 'BROWSE9_4'
aoTabPage[nTab]:lockUpdate(.t.)
DCREAD GUI PARENT aoTabPage[nTab] EXIT OPTIONS GetOptions SAVE PARENT @oDialog
DC_MergeGetLists(aGetList,GetList)
aoTabPage[nTab]:lockUpdate(.f.)
aTabs[nTab] := .t.
endif
init_tab("DOKU",oBrowse9)
PostAppEvent(xbeP_Keyboard,xbeK_CTRL_PGDN,,oBrowse9)
SetAppFocus(oBrowse9)
return .t.