Page 1 of 1

XBROWSE : METHOD DataRow() -> TDataRow()

PostPosted: Fri May 05, 2023 8:20 am
by Jimmy
hi,

when using METHOD EditSource() it will use METHOD Edit() which use CLASS TDataRow

CLASS TDataRow have a METHOD Edit() which is use a DIALOG
can i "color" this DIALOG :idea:

"inside" DIALOG it use TScrollPanel() and use "fix" Color CLR_BLACK
Code: Select all  Expand view
  oPanel:SetColor( CLR_BLACK, oDlg:nClrPane )

can i change Color of Panel :idea:

it is all for "Dark-Mode"

Re: XBROWSE : METHOD DataRow() -> TDataRow()

PostPosted: Fri May 05, 2023 11:56 am
by Marc Venken
WITH OBJECT oBrw
:nEditTypes := EDIT_GET
:bLDClickDatas := { || oBrw:EditSource() } // or { || youreditfunction() }
:CreateFromCode()
END

You can always make your own editdialog in all style you like.

Re: XBROWSE : METHOD DataRow() -> TDataRow()

PostPosted: Sat May 06, 2023 1:50 pm
by nageswaragunupudi
Marc Venken wrote:WITH OBJECT oBrw
:nEditTypes := EDIT_GET
:bLDClickDatas := { || oBrw:EditSource() } // or { || youreditfunction() }
:CreateFromCode()
END

You can always make your own editdialog in all style you like.


We recommend
Code: Select all  Expand view
oBrw:bEdit := { |oRec| OurEditFunction( oRec )

oRec is TDataRow object
Code: Select all  Expand view

function OurEditFunction( oRec )

   local lAppending := ( oRec:RecNo == 0 )

   @ r,c GET oRec:fieldName .... <other clauses>

// buttons for
// oRec:Save(), oRec:Undo()
// even oRec:GoTop() etc, navigation
 

Re: XBROWSE : METHOD DataRow() -> TDataRow()

PostPosted: Sat May 06, 2023 1:53 pm
by nageswaragunupudi
can i change Color of Panel :idea:

it is all for "Dark-Mode"

At present, it is not possible without modifying the source code of TDataRow class.
But soon we will provide a way to do it from the Application code and let you know.
If you like, we will share the revised program with you too.

Re: XBROWSE : METHOD DataRow() -> TDataRow()

PostPosted: Mon May 08, 2023 12:19 pm
by Jimmy
hi Marc,
Marc Venken wrote:You can always make your own editdialog in all style you like.

you are right, but i like to use what already exist

Re: XBROWSE : METHOD DataRow() -> TDataRow()

PostPosted: Mon May 08, 2023 12:20 pm
by Jimmy
hi,
nageswaragunupudi wrote:If you like, we will share the revised program with you too.

YES, please