Browser event posting
Posted: Fri Sep 28, 2012 9:36 am
Hello,
to fill the browser with the scoped records, I post the event CTRL+PGDN to the browser object, but in my code it does not work. It is still only the last record displayed in the browser, so I have manually to skip up. The code for scoping in init_tab() is executed correct.
regards
Rudolf
// Tabpage with browse object
@ 0,0 DCTABPAGE aoTabPage[2] CAPTION 'MA Buchungen' RELATIVE aoTabPage[1] STATICAREA aoTabStatic[2] GOTFOCUS {||init_tab("STD",oBrowse2,getlist)}
...
// Browse
@ .1,.5 DCBROWSE oBrowse2 PARENT aoTabStatic[2] ALIAS "STD" SCOPE SIZE SIZE_X-18,SIZE_Y-6 CURSORMODE XBPBRW_CURSOR_ROW
...
static function init_tab(cCode,oBrowse,aGetlist)
******************************************************************
std->(setorder("MITARB")) //
std->(DC_SETSCOPE(0,pers->nummer))
std->(DC_SETSCOPE(1,pers->nummer))
std->(dc_dbgobottom())
setappfocus(oBrowse)
postappevent(xbeK_CTRL_PGDN,,,oBrowse)
return .t.
to fill the browser with the scoped records, I post the event CTRL+PGDN to the browser object, but in my code it does not work. It is still only the last record displayed in the browser, so I have manually to skip up. The code for scoping in init_tab() is executed correct.
regards
Rudolf
// Tabpage with browse object
@ 0,0 DCTABPAGE aoTabPage[2] CAPTION 'MA Buchungen' RELATIVE aoTabPage[1] STATICAREA aoTabStatic[2] GOTFOCUS {||init_tab("STD",oBrowse2,getlist)}
...
// Browse
@ .1,.5 DCBROWSE oBrowse2 PARENT aoTabStatic[2] ALIAS "STD" SCOPE SIZE SIZE_X-18,SIZE_Y-6 CURSORMODE XBPBRW_CURSOR_ROW
...
static function init_tab(cCode,oBrowse,aGetlist)
******************************************************************
std->(setorder("MITARB")) //
std->(DC_SETSCOPE(0,pers->nummer))
std->(DC_SETSCOPE(1,pers->nummer))
std->(dc_dbgobottom())
setappfocus(oBrowse)
postappevent(xbeK_CTRL_PGDN,,,oBrowse)
return .t.