DCBROWSE with custom row editor
Posted: Sun Jan 16, 2022 9:52 am
Hi Roger,
I need to create a function that opens a rectangle overwriting the row of a selected browse, when i press ENTER o double click, like that:
in this way I can manage the record information well without having to use the standard cell editor that you have provided in the dcbrowse
for example:
@ x,y DCBROWSE oBrowse SIZE 100,25 ID "BROWSE" ;
CURSORMODE XBPBRW_CURSOR_ROW ALIAS cAlias ;
DATALINK {|a,oGet|MY_FUNCTION(oGet)}
static function MY_FUNCTION (oGet)
LOCAL GetOptions,GetList:={}
LOCAL nRow,nCol
nRow := * how i can retreive the row position of the browse ?
// field#1
field_1:=cAlias->FIELD1
nCol:= * how i can retreive the #1 column position of the browse ?
@ nRow,nCol DCGET field_1
// field#2
field_2:=cAlias->FIELD2
nCol:= * how i can retreive the #2 column position of the browse ?
@ nRow,nCol DCGET field_2
..
..
DCGETOPTIONS CONFIRM NOTITLE NORESIZE NOTASKLIST HIDE
DCREAD GUI OPTIONS GetOptions FIT MODAL ..... EVAL {|o| <positioning_at_browse_row_and_column> }
REPLACE ....
return nil
I need to create a function that opens a rectangle overwriting the row of a selected browse, when i press ENTER o double click, like that:
in this way I can manage the record information well without having to use the standard cell editor that you have provided in the dcbrowse
for example:
@ x,y DCBROWSE oBrowse SIZE 100,25 ID "BROWSE" ;
CURSORMODE XBPBRW_CURSOR_ROW ALIAS cAlias ;
DATALINK {|a,oGet|MY_FUNCTION(oGet)}
static function MY_FUNCTION (oGet)
LOCAL GetOptions,GetList:={}
LOCAL nRow,nCol
nRow := * how i can retreive the row position of the browse ?
// field#1
field_1:=cAlias->FIELD1
nCol:= * how i can retreive the #1 column position of the browse ?
@ nRow,nCol DCGET field_1
// field#2
field_2:=cAlias->FIELD2
nCol:= * how i can retreive the #2 column position of the browse ?
@ nRow,nCol DCGET field_2
..
..
DCGETOPTIONS CONFIRM NOTITLE NORESIZE NOTASKLIST HIDE
DCREAD GUI OPTIONS GetOptions FIT MODAL ..... EVAL {|o| <positioning_at_browse_row_and_column> }
REPLACE ....
return nil