/* lx_FormatDefaultCreate.ch Création des formats que j'utilise. Dernière modification : 2022-05-08 */ #ifndef _lx_FormatDefaultCreate_ch_ #define _lx_FormatDefaultCreate_ch_ method FormatDefaultCreate class LibxlClass local i local c ::SetRgbMode() ::FontDefaultCreate() ::CustomDefaultCreate() // *** Date formats *** ::aFD[ 'DateB' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'DateB' ], NUMFORMAT_DATE ) ::SetBorder( ::aFD[ 'DateB' ], BORDERSTYLE_THIN ) ::SetAlignH( ::aFD[ 'DateB' ], ALIGNH_CENTER ) // *** Date time ( timestamp ) formats *** ::aFD[ 'DTB' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'DTB' ], NUMFORMAT_CUSTOM_MDYYYY_HMM ) ::SetBorder( ::aFD[ 'DTB' ], BORDERSTYLE_THIN ) ::SetAlignH( ::aFD[ 'DTB' ], ALIGNH_CENTER ) // *** Standard formats *** ::aFD[ 'StandardB' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'StandardB' ], NUMFORMAT_GENERAL ) ::SetBorder( ::aFD[ 'StandardB' ], BORDERSTYLE_THIN ) ::aFD[ 'Standard_Gris20B' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'Standard_Gris20B' ], NUMFORMAT_GENERAL ) ::SetBorder( ::aFD[ 'Standard_Gris20B' ], BORDERSTYLE_THIN ) ::SetForegroundColor( ::aFD[ 'Standard_Gris20B' ], rgb_oGris20 ) ::aFD[ 'Standard_Gris20BW' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'Standard_Gris20BW' ], NUMFORMAT_GENERAL ) ::SetBorder( ::aFD[ 'Standard_Gris20BW' ], BORDERSTYLE_THIN ) ::SetForegroundColor( ::aFD[ 'Standard_Gris20BW' ], rgb_oGris20 ) ::SetWrap( ::aFD[ 'Standard_Gris20BW' ], .T. ) // *** Numeric formats. ::aFD[ 'nd00' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'nd00' ], NUMFORMAT_NUMBER ) ::SetBorder( ::aFD[ 'nd00' ], BORDERSTYLE_THIN ) for i := 1 to 18 c := 'nd' + strzero( i, 2, 0 ) ::aFD[ c ] := ::AddFormat() ::SetNumFormat( ::aFD[ c ], ::aCF[ c ] ) ::SetBorder( ::aFD[ c ], BORDERSTYLE_THIN ) endfor // *** Text formats. // Format pour les liens. // Voir aussi 'TitleLinkB' // Lien souligné bleu encadré. ::aFD[ 'LinkB' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'LinkB' ], NUMFORMAT_TEXT ) ::SetBorder( ::aFD[ 'LinkB' ], BORDERSTYLE_THIN ) ::SetFont( ::aFD[ 'LinkB' ], ::aPD[ 'Link' ] ) // Bleu non souligné wrap encadré. ::aFD[ 'LinkBWns' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'LinkBWns' ], NUMFORMAT_TEXT ) ::SetBorder( ::aFD[ 'LinkBWns' ], BORDERSTYLE_THIN ) ::SetFont( ::aFD[ 'LinkBWns' ], ::aPD[ 'Bleu' ] ) ::SetWrap( ::aFD[ 'LinkBWns' ], .T. ) ::aFD[ 'TextB' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'TextB' ], NUMFORMAT_TEXT ) ::SetBorder( ::aFD[ 'TextB' ], BORDERSTYLE_THIN ) ::aFD[ 'TextBW' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'TextBW' ], NUMFORMAT_TEXT ) ::SetBorder( ::aFD[ 'TextBW' ], BORDERSTYLE_THIN ) ::SetWrap( ::aFD[ 'TextBW' ], .T. ) ::aFD[ 'Text_Gris20B' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'Text_Gris20B' ], NUMFORMAT_TEXT ) ::SetBorder( ::aFD[ 'Text_Gris20B' ], BORDERSTYLE_THIN ) ::SetForegroundColor( ::aFD[ 'Text_Gris20B' ], rgb_oGris20 ) ::aFD[ 'TitleB' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'TitleB' ], NUMFORMAT_TEXT ) ::SetBorder( ::aFD[ 'TitleB' ], BORDERSTYLE_THIN ) ::SetForegroundColor( ::aFD[ 'TitleB' ], rgb_yellow ) ::SetFont( ::aFD[ 'TitleB' ], ::aPD[ 'Bold' ] ) ::aFD[ 'Title1B' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'Title1B' ], NUMFORMAT_TEXT ) ::SetBorder( ::aFD[ 'Title1B' ], BORDERSTYLE_THIN ) ::SetForegroundColor( ::aFD[ 'Title1B' ], rgb_darkturquoise ) ::SetFont( ::aFD[ 'TitleB' ], ::aPD[ 'Bold' ] ) ::aFD[ 'Title2B' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'Title2B' ], NUMFORMAT_TEXT ) ::SetBorder( ::aFD[ 'Title2B' ], BORDERSTYLE_THIN ) ::SetForegroundColor( ::aFD[ 'Title2B' ], rgb_orangered ) ::SetFont( ::aFD[ 'Title2B' ], ::aPD[ 'Bold' ] ) ::aFD[ 'TitleLinkB' ] := ::AddFormat() ::SetNumFormat( ::aFD[ 'TitleLinkB' ], NUMFORMAT_TEXT ) ::SetBorder( ::aFD[ 'TitleLinkB' ], BORDERSTYLE_THIN ) ::SetForegroundColor( ::aFD[ 'TitleLinkB' ], rgb_yellow ) ::SetFont( ::aFD[ 'TitleLinkB' ], ::aPD[ 'TitleLink' ] ) return Self #endif // _lx_FormatDefaultCreate_ch_