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

Re: FMain.bFontStyle is Boolean


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

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