Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DynamicFont Problem
Message
From
19/05/2007 06:14:57
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01226509
Message ID:
01227018
Views:
29
This message has been marked as a message which has helped to the initial question of the thread.
My point is that the logical construct "If sometruelogic then yourvalue=.T. else yourvalue=.F." can be replaced by "yourvalue=sometruelogic". In this particular case
IF EVALUATE( THISFORM.obizobj.cAlias + ".IRECORDCERTIFIED" )> 0
  THIS.FONTBOLD = .T.
ELSE
  THIS.FONTBOLD = .F.
ENDIF
can be replaced by one line
This.fontbold=EVALUATE( THISFORM.obizobj.cAlias + ".IRECORDCERTIFIED" )> 0
In your original code
mygrid.dynamicFontBold = [IIF(v_AgendaPhar.IRECORDCERTIFIED > 0 , .T. , .F. )]
can be replaced by
mygrid.dynamicFontBold = [v_AgendaPhar.IRECORDCERTIFIED > 0]
>Hi tore?
>
>>not an answer to your question, but did you know that you can shorten your code a lot?
>
>No , How ?
>
>Naomi give a good idea.
>I create a class ( txtFontBold ).
>
>In gotfocus() :
>
>IF TYPE( Thisform.obizobj.cAlias + ".IRECORDCERTIFIED") = "N"
>  *-- Si médicament cerTifié.
>  IF EVALUATE( THISFORM.obizobj.cAlias + ".IRECORDCERTIFIED" )> 0
>    THIS.FONTBOLD = .T.
>  ELSE
>    THIS.FONTBOLD = .F.
>  ENDIF
>
>  THIS.BACKCOLOR = ICASE( EVALUATE( THISFORM.obizobj.cAlias + ".lgest=.F." ),RGB( 251,155,184 ),;
>    EVALUATE( THISFORM.obizobj.cAlias + ".sinecessaire"),RGB(191,191,255),16777215)
>
>ENDIF
>
>
>
>
>bernhart
>
>
>>
mygrid.dynamicFontBold = [v_AgendaPhar.IRECORDCERTIFIED > 0]
>>
>>
>>
>>>Hi all,
>>>
>>>
>>>I have this form :
>>>http://cjoint.com/data/fruWIygcLd.htm
>>>
>>>mygrid.dynamicFontBold = [IIF(v_AgendaPhar.IRECORDCERTIFIED > 0 , .T. , .F. )]
>>>
>>>BUT if i put the Cursor on the active cellule , the fontBold disappears. !
>>>
>>>How can i have dynamicFontBold = [IIF(v_AgendaPhar.IRECORDCERTIFIED > 0 , .T. , .F. )]
>>>in the acTive rox or cellule.
>>>
>>>SelectedItemFontBold Property don't exist....
>>>
>>>
>>>bernhart
Previous
Reply
Map
View

Click here to load this message in the networking platform