DCADDCELLITEM USING OBJECTS

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

DCADDCELLITEM USING OBJECTS

#1 Post 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
Attachments
eXpress.PNG
eXpress.PNG (40.35 KiB) Viewed 7263 times
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCADDCELLITEM USING OBJECTS

#2 Post by rdonnay »

Show me what your code looks like now.
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: DCADDCELLITEM USING OBJECTS

#3 Post 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.
Nolberto Paulino
Regards

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: DCADDCELLITEM USING OBJECTS

#4 Post 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.
Nolberto Paulino
Regards

Post Reply