Page 1 of 1

XBROWSE SHOW A RECORD - SUPERLIB

PostPosted: Thu Apr 29, 2010 7:34 am
by MdaSolution
DO YOU REMEMBER THE FUNCTION OF CLIPPER SUPERLIB 3.5 TO SHOW VERTICAL A RECORD ?

HOW I CAN IMPLEMENT tHIS WITH XBROWSE

THANKS

Re: XBROWSE SHOW A RECORD - SUPERLIB

PostPosted: Thu Apr 29, 2010 11:14 am
by Antonio Linares
Code: Select all  Expand view

#include "FiveWin.ch"
#include "xbrowse.ch"

function Main()

   local oDlg, oBrw, oCol, aRecord, nAt := 1
   
   USE Customer
   
   aRecord = Array( Customer->( FCount() ) )
   
   DEFINE DIALOG oDlg SIZE 300, 300

   @ 0, 0 XBROWSE oBrw OF oDlg ARRAY aRecord // AUTOSORT

   oCol = oBrw:AddCol()
   oCol:bStrData = { || Customer->( FieldName( oBrw:nArrayAt ) ) }
   oCol:cHeader = "FieldName"  

   oCol = oBrw:AddCol()
   oCol:bStrData = { || Customer->( FieldGet( oBrw:nArrayAt ) ) }
   oCol:cHeader = "Value"  

   oBrw:nMarqueeStyle = MARQSTYLE_HIGHLROW

   oBrw:CreateFromCode()
   oBrw:bKeyCount = { || Customer->( FCount() ) }
   
   oDlg:oClient = oBrw  
     
   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT oDlg:Resize()
     
return nil
 

Image

Re: XBROWSE SHOW A RECORD - SUPERLIB

PostPosted: Fri Apr 30, 2010 10:22 am
by MdaSolution
tx

Re: XBROWSE SHOW A RECORD - SUPERLIB

PostPosted: Mon May 03, 2010 3:38 pm
by MdaSolution
Antonio,
have you think about it to insert a new method on xbrowse class to show it ?
where the user can edit all fields .... just an idea !

Re: XBROWSE SHOW A RECORD - SUPERLIB

PostPosted: Mon May 03, 2010 9:42 pm
by ukoenig
The sample : xbrstru.prg shows how to edit a record vertical
and refreshes the xBrowse.

Image

Best Regards
Uwe :lol: