Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Highlight Problem in a grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01227011
Message ID:
01359004
Vues:
26
Thank Nick For Help.

Sorry for my poor english.

Here is what i want :
http://www.amline.be/GRID.PNG




The dynamicbackcolor of the grid column=

aCol[7,DYN_BK_COL_ADV12] =;
"IIF(EMPTY(v_etat.daccord) ,RGB(255,219,237) ,16777215)"


Here is what i have
http://www.amline.be/GRID2.PNG
Accord is red and it is good !
Why yellow and not black for the forecolor ?


http://www.amline.be/GRID3.PNG
Here i should like all the recnobar ....but i don't have this recnobar !


A idea ?
*-- Onpostsetdynamiccolor
LOCAL lcHost,;
 loControl,;
 nNbrCol


lcHost = THIS.chostname

THISFORM.LOCKSCREEN = .T.

WITH THIS.PARENT.&lcHost && I intentionally do not keep this reference in the object property
 && to avoid the possibility of dangling object references



 FOR EACH loControl IN .COLUMNS
  *-- 05/2005 BUG ! un space( X ) à la fiN d'1 dynamicxxxxxx donne rien !
  *-- Si on désire un DynamicBackolor  (12)
  
  nNbrCol = loControl.COLUMNORDER
  IF VARTYPE( .oCustomAdvisorgrid.aCol[  nNbrCol  ,DYN_BK_COL_ADV12] ) = "C"
   loControl.DYNAMICBACKCOLOR =  ;
    ALLTRIM( .oCustomAdvisorgrid.aCol[  nNbrCol ,DYN_BK_COL_ADV12] )
  ENDIF

  *!*	  IF VARTYPE( .oCustomAdvisorgrid.aCol[  nNbrCol  ,DYN_BK_COL_ADV12] ) = "C"
  *!*	   loControl.DYNAMICBACKCOLOR =  ;
  *!*	    "My_color(" + ICASE( .lWantAllBar , '.T.' , '.F.' ) + ',' +;
  *!*	    ALLTRIM( .oCustomAdvisorgrid.aCol[  nNbrCol ,DYN_BK_COL_ADV12] ) + ',' +;
  *!*	    "This.parent.GridhighLighter1.nRecno, This.parent.GridhighLighter1.cHighBackColor)"
  *!*	  ENDIF



  *-- Si on désire un DynamicForeColor  (13)
  IF VARTYPE( .oCustomAdvisorgrid.aCol[ nNbrCol ,DYN_FR_COL_ADV13] ) = "C"
   loControl.DYNAMICFORECOLOR =  ;
    ALLTRIM( .oCustomAdvisorgrid.aCol[ nNbrCol ,DYN_FR_COL_ADV13] )
  ENDIF
  *-- Si on désire un DynamicFont  (14)
  IF VARTYPE( .oCustomAdvisorgrid.aCol[ nNbrCol ,DYN_FONBLD_ADV14] ) = "C"
   loControl.DYNAMICFONTBOLD	 =  ;
    ALLTRIM( .oCustomAdvisorgrid.aCol[ nNbrCol ,DYN_FONBLD_ADV14] )
  ENDIF
  *-- Si on désire un DynamicFontItalic  (16)
  IF VARTYPE( .oCustomAdvisorgrid.aCol[ nNbrCol ,16] ) = "C"
   loControl.DYNAMICFONTITALIC	 =  ;
    ALLTRIM( .oCustomAdvisorgrid.aCol[ nNbrCol ,16] )
  ENDIF
  *-- Si on désire un DYNAMICFONTSTRIKETHRU  (17)
  IF VARTYPE( .oCustomAdvisorgrid.aCol[ nNbrCol ,17] ) = "C"
   loControl.DYNAMICFONTSTRIKETHRU =  ;
    ALLTRIM( .oCustomAdvisorgrid.aCol[ nNbrCol ,17] )
  ENDIF
  *-- Ctrl Actif ds une colonne (18).
  IF VARTYPE( .oCustomAdvisorgrid.aCol[ nNbrCol ,DYN_CURR_ADV18] ) = "C"
   loControl.DYNAMICCURRENTCONTROL =   ;
    ALLTRIM( .oCustomAdvisorgrid.aCol[ nNbrCol ,DYN_CURR_ADV18] )
   *-- 12/2006 Pour que le fond du cmd soit Gris.
   loControl.DYNAMICBACKCOLOR = [RGB(212,208,200)]
  ENDIF
  *-- DynamicInputMask (20).
  IF VARTYPE( .oCustomAdvisorgrid.aCol[ nNbrCol ,DYN_INPUTMSK_ADV20] ) = "C"
   loControl.DYNAMICINPUTMASK = ;
    ALLTRIM( .oCustomAdvisorgrid.aCol[ nNbrCol ,DYN_INPUTMSK_ADV20] )
  ENDIF
 ENDFOR

 .oCustomAdvisorgrid.lPresente( THIS.PARENT.&lcHost )

ENDWITH

THISFORM.LOCKSCREEN = .F.
>Hi Bernhart,
>
>Yes, you can do this - look here for example: Re: Grid Highlighter Thread #503867 Message #503971
>
>Nick
>
>>Hi Nick,
>>
>>
>>is it possible to have this result ?
>>http://www.amline.be/GRID.PNG
>>
>>And what do i transform in your Code to have tHis result ?
>>
>>bernhart
>>
>>
>>>>HI all,
>>>>
>>>>Look at this picture :
>>>>http://cjoint.com/data/fti57wGa2N.htm
>>>>
>>>>I don't have a color in the date fields. Why ?
>>>>it 's not the active cellule in the grid.
>>>>
>>>>bernhart
>>>
>>>You might try to use my gridhighlighter class, it works with columns where Sparse = .f. with no problems.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform