[Gambas-user] 'FontChooser.SelectedFont' is not static

Lewis Balentine lewis at ...3412...
Fri Nov 28 13:24:29 CET 2014


Sorry to be a pest but I have run into another problem I can not seem to 
get past and I can find no examples. I am trying to use the FontChooser 
control (gb.form) in a very simple form.

'---------------------------------------------
Public Sub FontBox1_Click()
   ' Dim S As String
' Dim S As String[]
' Dim S As New String[]
   ' Dim S as Font

   ' S = FontChooser.SelectedFont
   ' S = FontChooser.Font
   ' S = FontChooser.Name
   ' TextArea1.Font = FontChooser.SelectedFont
   ' TextArea1.Font = FontChooser.Font

    Print FontChooser.SelectedFont
   Stop
End
'---------------------------------------------
Everything that I try gives me an similar error:
   'FontChooser.SelectedFont' is not static in Form 2:23.
   'FontChooser.Font' is not static in Form 2:24.
   'FontChooser.Name' is not static in Form 2:25.

When I look at the wiki it states:
   Property SelectedFont As String
   Returns or sets the selected font as a string.

   Property Name As String
   Returns or sets the name of the control.

   Property Font As Font
   Returns or sets the font used to draw text in the control.

I have run out of not so clever ideas.

regards,

Lewis






More information about the User mailing list