Página 1 de 1

Negrita algunos registros en un browse FORO PRO

Publicado: Vie Ago 26, 2016 8:55 pm
por gabo1
Carlos Ortiz, Aqui tienes un ejemplo

Código: Seleccionar todo


//------------------------------------------------------------------------------
METHOD FormInitialize( oSender ) CLASS TFormExistencias
  ::oFontNegrita:= TFont():Create( "Droid Sans", 10, 0, 700 )
  RETURN Nil

//------------------------------------------------------------------------------
METHOD DetalleSucursales() CLASS TFormExistencias

     ::oMemDSItems:GoTop()
     WITH OBJECT ::oBrwExistencias
          :nMarqueeStyle   := bmHIGHLCELL
          :nColDividerStyle:= blLIGHTGRAY
          nLenTalla:= Len( :aCols )
          FOR nItem:= 1 TO nLenTalla
              IF nItem > 2
                 :aCols[nItem]:cPicture:= "@Z 99,999,999"
                 :aCols[nItem]:nWidth  := 55
                 :aCols[nItem]:nAlignment:= taRIGHTHEADERCENTER
                 :aCols[nItem]:OnDrawCell:= "PintaCelda"
              ENDIF
          NEXT
     END WITH

 RETURN NIL

//------------------------------------------------------------------------------
METHOD PintaCelda( oSender, cText, nClrText, nClrPane, lHighLite, hDC, aRect ) CLASS TFormExistencias

  IF ::oMemDSItems:EMPRESA == " T O T A L"
     SelectObject( hDC, ::oFontNegrita:Handle )
     IF !lHighLite
        nClrPane := clYellow
     ENDIF
  ENDIF

  RETURN NIL

Saludos!

Re: Negrita algunos registros en un browse FORO PRO

Publicado: Sab Ago 27, 2016 6:01 pm
por Carlos Ortiz
Estimado, muchas gracias!!! ;)