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

  • Creator
  • #3957

    Can someone point me to an example that will allow me to change a control… like a checkbox to make the caption bold. I see the controlFont object, but cannot make it work.

    Many thanks in advance

  • Author
  • #6705
    Support 1a

    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
      set iPnCtl = nothing
      set iCkCtl = nothing
      set iDlg = nothing

    I assume this answer is regarding v1.6.

    Now that 2.0 is out, what would be the sample code to change the look of controls using the ControlFont property?

    Can the actual data entry also be changed? I would like to be able to make my controls look disabled.

    Support 3

    In Formativ 2.0 visual forms designer, you can change control Font, Enabled state, etc. You will need to select the control (label, button, etc) and change its properties in Object Inspector.

    Hope this helps.

    Advansys Support


    I’m looking to do this programmatic as the above code shows for the Panel Control and not in the designer.

    In other words, has the .Font property been exposed for all the “fcControlDlg” controls yet?

    Support 3

    In Formativ 2.0 visual forms controls, you can change the control enabled state, font, etc.

    For example, code below change a label control enable state, font size.

      MainDlg.labelDescription.enabled = false
      MainDlg.labelDescription.font.size = 12

    Advansys Support

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.