[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FMain.bFontStyle is Boolean


<<
CbxStyles.Text = CbxStyles.List[CbxStyles.Find(Str(FMain.bFontStyle))]

You can replace By :
CbxStyles.Text = iif(FMain.bFontStyle, "True", "False")
>>
<<
If CbxStyles.Current.Text = "False" Then FMain.bFontStyle = False
If CbxStyles.Current.Text = "True" Then FMain.bFontStyle = True

You can replace By :
FMain.bFontStyle =  CbxStyles.Current.Text = "True"
>>

Cordialement,
Fabien Bodard

Le lun. 3 févr. 2025 à 10:36, Philippe Valarcher <philippe.valarcher@xxxxxxx>
a écrit :

> Le dimanche 02 février 2025 à 22:09 +0000, Bruce Steers a écrit :
>
> FMain.bFontStyle is Boolean
>
> Sorry, I forgot the Objet of the mail.
> Thank you Bruce for the answer, it works now :
>
> Public Sub Form_Open()
>
> Dim fontName As String
> Dim fontTaille As String
> Dim fontStyle As String
>
> CbxFonts.Clear()
> CbxTailles.Clear()
> CbxStyles.Clear()
>
> For Each fontName In Fonts
> CbxFonts.Add(fontName)
> Next
>
> For Each fontStyle In ["False", "True"]
> CbxStyles.Add(fontStyle)
> Next
>
> For Each fontTaille In ["8", "9", "10", "11", "12", "13"]
> CbxTailles.Add(fontTaille)
> Next
>
> CbxFonts.Text = CbxFonts.List[CbxFonts.Find(FMain.sFontName)]
> CbxTailles.Text = CbxTailles.List[CbxTailles.Find(FMain.iFontSize)]
> CbxStyles.Text = CbxStyles.List[CbxStyles.Find(Str(FMain.bFontStyle))]
>
> End
>
> With this :
>
> Public Sub CbxStyles_Click()
>
> If CbxStyles.Current.Text = "False" Then FMain.bFontStyle = False
> If CbxStyles.Current.Text = "True" Then FMain.bFontStyle = True
>
> End
>


-- 
Fabien Bodard

Follow-Ups:
Re: FMain.bFontStyle is BooleanPhilippe Valarcher <philippe.valarcher@xxxxxxx>
References:
[no subject]Philippe Valarcher <philippe.valarcher@xxxxxxx>
Re:Bruce Steers <bsteers4@xxxxxxxxx>
Re: FMain.bFontStyle is BooleanPhilippe Valarcher <philippe.valarcher@xxxxxxx>