Page 1 of 1

DCADDCELLITEM USING OBJECTS

Posted: Sat May 09, 2020 10:12 am
by digitsoft
hello Roger
how can I add an object using DCADDCELLITEM to change the Browse data

I want to change the Data that is in Red and Blue of the Browse

Re: DCADDCELLITEM USING OBJECTS

Posted: Thu May 14, 2020 8:17 am
by rdonnay
Show me what your code looks like now.

Re: DCADDCELLITEM USING OBJECTS

Posted: Wed Jun 10, 2020 10:21 am
by digitsoft
@ 0.00,00.00 DCBROWSE oBrowse DATA aBrowse ;
PRESENTATION DC_BrowPres(30.0,"12.Arial") ;
SIZE 117.5,27.4 ;
SCROLLBARHEIGHT 30 ;
NOHSCROLL ;
CURSORMODE XBPBRW_CURSOR_ROW ;
USEVISUALSTYLE ;
SUBCLASS 'DC_XbpOwnerDrawBrowseGeneric()'

DCBROWSECOL DATA {|a,o| CellArray( aBrowse, oBrowse ) } WIDTH 70 PARENT oBrowse OWNERDRAW



FUNCTION CellArray( axBrowse, oxBrowse )
local aData[0], cFont := '09.Arial'
local cTable := DC_GetColArray(02,oxBrowse)
local cIndex := LEFT(DC_GetColArray(02,oxBrowse),AT(".",DC_GetColArray(02,oxBrowse)))+"CDX"
local cRutaTable := DC_GetColArray(01,oxBrowse)

@ 002.0,002.0 DCADDCELLITEM cRutaTable+cTable WIDTH 600 HEIGHT 50 FONT "12.Arial Bold" FGCOLOR GRA_CLR_BLACK ALIGN XBPALIGN_LEFT TO aData

@ 020.0,002.0 DCADDCELLITEM "Leyenda..." WIDTH 600 HEIGHT 72 FONT "12.Arial Bold" FGCOLOR GRA_CLR_BLUE ALIGN XBPALIGN_LEFT TO aData

@ 002.0,690.0 DCADDCELLITEM "100.0 %" WIDTH 100 HEIGHT 72 FONT "20.Arial Bold" FGCOLOR GRA_CLR_RED ALIGN XBPALIGN_LEFT TO aData

dbcloseall()

return aData




rdonnay wrote:Show me what your code looks like now.

Re: DCADDCELLITEM USING OBJECTS

Posted: Sun Jun 21, 2020 7:49 am
by digitsoft
Hello Roger Add this code in line 5061
ELSEIF Valtype (cCaption) == 'O' && Nolberto Paulino
oBitmap: = cCaption
IF oBitmap: isDerivedFrom ('XbpBitmap')
:: oBitmap: = oBitmap
Bitmap: = .t.
END

to solve the problem if the Title is a BitMap Object
in _dcxbrow.prg


digitsoft wrote:@ 0.00,00.00 DCBROWSE oBrowse DATA aBrowse ;
PRESENTATION DC_BrowPres(30.0,"12.Arial") ;
SIZE 117.5,27.4 ;
SCROLLBARHEIGHT 30 ;
NOHSCROLL ;
CURSORMODE XBPBRW_CURSOR_ROW ;
USEVISUALSTYLE ;
SUBCLASS 'DC_XbpOwnerDrawBrowseGeneric()'

DCBROWSECOL DATA {|a,o| CellArray( aBrowse, oBrowse ) } WIDTH 70 PARENT oBrowse OWNERDRAW



FUNCTION CellArray( axBrowse, oxBrowse )
local aData[0], cFont := '09.Arial'
local cTable := DC_GetColArray(02,oxBrowse)
local cIndex := LEFT(DC_GetColArray(02,oxBrowse),AT(".",DC_GetColArray(02,oxBrowse)))+"CDX"
local cRutaTable := DC_GetColArray(01,oxBrowse)

@ 002.0,002.0 DCADDCELLITEM cRutaTable+cTable WIDTH 600 HEIGHT 50 FONT "12.Arial Bold" FGCOLOR GRA_CLR_BLACK ALIGN XBPALIGN_LEFT TO aData

@ 020.0,002.0 DCADDCELLITEM "Leyenda..." WIDTH 600 HEIGHT 72 FONT "12.Arial Bold" FGCOLOR GRA_CLR_BLUE ALIGN XBPALIGN_LEFT TO aData

@ 002.0,690.0 DCADDCELLITEM "100.0 %" WIDTH 100 HEIGHT 72 FONT "20.Arial Bold" FGCOLOR GRA_CLR_RED ALIGN XBPALIGN_LEFT TO aData

dbcloseall()

return aData




rdonnay wrote:Show me what your code looks like now.