/ Forums / Advansys Formativ / Creating Solutions with Formativ / Using ControlFont to change control look. / Reply To: Using ControlFont to change control look.

#6705
Support 1a
Participant

Unfortunately some controls do not expose the font property – the checkbox is one of them. All controls will have the font property (and many others) exposed in the next release of Formativ. No release dates are currently available.

In the meantime, here’s some sample code that shows how to use the font property with a panel control.

Advansys Support

dim iDlg
  dim iCkCtl
  dim iPnCtl
  
  
  set iDlg = Utilities.NewControlBoxDialog
  
  ' Check box control  
  set iCkCtl = iDlg.AddCheckBoxControl                 
  
  ' Panel control  
  set iPnCtl = iDlg.AddPanelControl 
  with iPnCtl
    .Font.Style = ffsBold
    .Font.Color = fclMaroon
    .Alignment = ftaLeftJustify
    .Left = 20
    .AutoSpace = FALSE
    .SpaceAbove = -15
    .Caption = "Show All"
  end with
  
  
  ' Execute the dialog
  iDlg.execute
  
  
  set iPnCtl = nothing
  set iCkCtl = nothing
  set iDlg = nothing