Button style exampleΒΆ

+window Window3 at 25,50 {
     label_bgc = RGB_FLORALWHITE    /* Set window label colours */
     label_fgc = RGB_INDIANRED

     checkbox group PrintStyle {    /* Button group definition*/
          /* Set a different background colour at group level */
          label_bgc = RGB_GHOSTWHITE

          /* Group style flag, placing button labels to the left of the checkbox */
          style = WS_LJT
          +button Bold at 30,10 {   /* Checkbox button */
               label = "Bold"
               width = 100
          }
          +button Underline at 30,90 {
               label = "Underline"
               width = 100
          }
          +button Italic at 30,170 {
               label = "Italic"
               width = 100
               /* Button style flag. This flag is added to WS_LJT, which was set
               at group level. */
               style = WS_CHECKED
          }
     }
}

In this example a label background colour is set at window level, but overridden for this button group. None of the buttons in the group has a label colour clause of its own, so they use the colours already set.

The third button is assigned the style WS_CHECKED, which means that it will be created checked.


RELATED TOPICS

Buttons

Button style

Button label