Browse and colors

This forum is for eXpress++ general support.
Post Reply
Message
Author
c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Browse and colors

#1 Post by c-tec »

Hello,
I have color codeblocks on browse columns and I use CURSORMODE XBPBRW_CURSOR_ROW. I want that the cell with the color codeblock keep the color, actually the whole row is highlighted. Is that possible ?
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Browse and colors

#2 Post by skiman »

Yes, that would be a nice feature.

I suppose it can be done with ownerdrawing.
Best regards,

Chris.
www.aboservice.be

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Browse and colors

#3 Post by Auge_Ohr »

skiman wrote:Yes, that would be a nice feature.
I suppose it can be done with ownerdrawing.
hm ... i do it with a Columne Class.

Code: Select all

******************************************
CLASS XbpColumnLocal FROM XbpColumn
******************************************
EXPORTED:
   INLINE METHOD HiliteRow( nRowPos, lHilite, lFrame, lRepaint )
   *************************************************************
   LOCAL aColor
   LOCAL RETVAR

   IF ( lHilite )                     // .AND. ( aColor:= Eval( ::colorBlock ) ) # nil
      IF ::colorBlock # NIL
         aColor:= Eval( ::colorBlock )
         IF aColor = NIL
            RETVAR := ::XbpColumn:HiliteRow( nRowPos, lHilite, lFrame, lRepaint )
         ELSE
            RETVAR := ::dataArea:setCellColor( nRowPos, aColor[ 1 ], aColor[ 2 ] )
         ENDIF
      ELSE
         RETVAR := ::XbpColumn:HiliteRow( nRowPos, lHilite, lFrame, lRepaint )
      ENDIF
   ELSE
      RETVAR := ::XbpColumn:HiliteRow( nRowPos, lHilite, lFrame, lRepaint )
   ENDIF
   RETURN RETVAR
ENDCLASS
greetings by OHR
Jimmy

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Browse and colors

#4 Post by skiman »

Hi Jimmy,

Simple and effective. Thanks for this code.
Best regards,

Chris.
www.aboservice.be

Post Reply