FontBox.getColorCombo

Syntax

getColorCombo ()

Description

The getColorCombo method returns the ColorCombo component used to select text color.

Example

To execute the example, the page must contain a FontBox component named textSettings. In the BODY tag add DIV items with the identifiers check1, check2, check3, and check4. Add checkboxes selecting and deselecting which activates or deactivates various components included into FontBox:

//determine activity of the drop-down list to choose color 
      var checkBox1 = new PP.Ui.CheckBox(
       {
           Content: "ColorCombo",
           CheckedChanged: checkedColor,
           ParentNode: document.getElementById("check1")
       })
           function checkedColor()
           {
               if (checkBox1.getChecked() == true)
               {
                   textSettings.getColorCombo().setEnabled(true)
               }
               else textSettings.getColorCombo().setEnabled(false)
           }
      //determine activity of drop-down list to chose font family
      var checkBox2 = new PP.Ui.CheckBox(
       {
           Content: "FontFamily",
           CheckedChanged: checkedFont,
           ParentNode: document.getElementById("check2")
       })
           function checkedFont()
           {
               if (checkBox2.getChecked() == true)
               {
                   textSettings.getFontFamilyComboBox().setEnabled(true)
               }
               else textSettings.getFontFamilyComboBox().setEnabled(false)
           }
       //determine activity of value editor to chose font size
       var checkBox3 = new PP.Ui.CheckBox(
       {
           Content: "FontSize",
           CheckedChanged: checkedFontSize,
           ParentNode: document.getElementById("check3")
       })
           function checkedFontSize()
           {
               if (checkBox3.getChecked() == true)
               {
                   textSettings.getFontSizeComboBox().setEnabled(true)
               }
               else textSettings.getFontSizeComboBox().setEnabled(false)
           }
       //determine activity of toolbar
       var checkBox4 = new PP.Ui.CheckBox(
       {
           Content: "ToolBar",
           CheckedChanged: checkedToolbar,
           ParentNode: document.getElementById("check4")
       })
           function checkedToolbar()
           {
               if (checkBox4.getChecked() == true)
               {
                   textSettings.getToolbar().setEnabled(true)
               }
               else textSettings.getToolbar().setEnabled(false)
           }

After executing the example the following checkboxes are placed in the page: ColorCombo, FontSize, ToolBar, and FontFamily, selecting or deselecting these checkboxes activates or deactivates respective components.

See also:

FontBox